Debugging in the DeclarationBuilderBase in duchain

Esben Mose Hansen kde at mosehansen.dk
Tue Nov 11 21:37:48 UTC 2008


Hi,

I am attempting to scratch a serious itch, namely that kdevelop4 crashes on 
some of the files I need to maintain at work. Not knowing exactly what goes 
wrong, I have identified the first suspicious message from the parsing.

DeclarationBuilder::visitTemplateParameter: type-parameter is missing

which originates from declarationbuilder.cpp:159.  After further poking I 
found the following (valid) C++ code to trigger this message:

  template<bool>
    struct __truth_type
    {  };

My question is: Is the message supposed to be triggered by valid C++ code? 
Looking at the other message, it looks like it was supposed to be a warning, 
but it is hard for me to understand the intent of this. Changing the above 
code to

template<bool T>
struct __truth_type
{ };

leads to a drastically different path in that function, which to my 
unexperienced eye looks to be relevant for the first declaration, too. E.g, 
surely the duchain must know about the template parameter, even if it doesn't 
have an actual name? But that code is simply skipped in the first, message-
producing case.

With the hope of enlightenment, 

-- 
Kind regards, Esben

PS: This is my feeble attempt at fixing bug 
https://bugs.kde.org/show_bug.cgi?id=173036. Or maybe learn enough to be able 
to fix such bugs in the future.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20081111/f7f7c5ef/attachment.html>


More information about the KDevelop-devel mailing list