improper parsing of macros

Sven Brauch svenbrauch at googlemail.com
Tue Jan 18 20:55:23 UTC 2011


I can confirm this problem. Happens for me, too.

2011/1/18 Milian Wolff <mail at milianw.de>:
> Hey all, esp. David.
>
> I often notice that my files show DUChain errors when I restart KDevelop. I
> notice it most often with macros defined in qglobal.h, e.g. Q_ASSERT,
> Q_FOREACH/foreach, ... but I assume it could be encountered with different
> macros as well.
>
> It shows essentially like this:
>
> Q_ASSERT(myCode());
>
> hovering Q_ASSERT shows the proper information (macro defined in qglobal.h,
> ...), but it is definitely not properly found during parsing, as myCode() is
> not highlighted and I see a problem reported that Q_ASSERT could not be found.
>
> Sometimes I only see it because QString code completion does not show me most
> of the functions, like mid, left, etc. pp. because they use Q_REQUIRED_RESULT
> in the header. Opening qstring.h I see parse errors indicating that
> Q_REQUIRED_RESULT is not taken as macro but as simple identifier.
>
> Anyways, each time I ctrl + click on one of the "missing" macros in the
> editor, switch back to the improper parsed file, and hit F5 the problem goes
> away.
>
> So it seems to be like something with the macro merging or similar is broken.
> Can anyone else see this behavior?
>
> David: Any clue on how I could debug this?
>
> Bye
> --
> Milian Wolff
> mail at milianw.de
> http://milianw.de
>
> --
> KDevelop-devel mailing list
> KDevelop-devel at kdevelop.org
> https://barney.cs.uni-potsdam.de/mailman/listinfo/kdevelop-devel
>
>




More information about the KDevelop-devel mailing list