Format comments before setting them on the DUChain

Authored by mwolff on Dec 21 2017, 11:21 PM.



This removes the /// and /* ... */ prefixes. Not only does this
make the stuff way more readable, it also fixes our JSON tests...

Return proper non-C++ specific includes/defines for non-project files

When we query the includes/defines for a file outside of any project
we always returned the C++ compiler includes/defines. This was because
we never tried to guess the language type then, since we operated only
on ProjectBaseItems pointers which are obviously nullptr for files
outside of any project. Instead, operate on QString path
representations like elsewhere in the IADM already. This allows us to
guess the language type even for C, ObjC and Cuda files when they are
not part of a project.

No unit test is added, but I found this while working on a separate
feature that has a proper unit test attached.

Handle _Complex types

We just create a delayed type that holds the string representation.
This is enough to get the type displayed in the tooltips and it also
removes the pesky warnings from the command line about unhandled

Diff Detail

R32 KDevelop
Automatic diff as part of commit; lint not applicable.
Automatic diff as part of commit; unit tests not applicable.
mwolff created this revision.Dec 21 2017, 11:21 PM
Restricted Application added a subscriber: kdevelop-devel. · View Herald TranscriptDec 21 2017, 11:21 PM
mwolff requested review of this revision.Dec 21 2017, 11:21 PM

of course this is actually three patches, but I'm too lazy to juggle with arc. Sigh, that tool is such a broken piece of shit - who uses a workflow like this?!?!

brauch accepted this revision.Dec 21 2017, 11:58 PM
brauch added a subscriber: brauch.

All three changes look good to me, although the formatting of comments is of course only useful until that clang bug is fixed ... but still, better than nothing and esp. when we already have the implentation in the codebase anyways.

This revision is now accepted and ready to land.Dec 21 2017, 11:58 PM
This revision was automatically updated to reflect the committed changes.