improper parsing of macros

Milian Wolff mail at milianw.de
Tue Jan 18 18:27:26 UTC 2011


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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20110118/24bd6538/attachment.sig>


More information about the KDevelop-devel mailing list