Bug 403484 - many classes not resolved by C++ indexer
Summary: many classes not resolved by C++ indexer
Status: CONFIRMED
Alias: None
Product: kdevelop
Classification: Applications
Component: Language Support: CPP (Clang-based) (show other bugs)
Version: 5.3.1
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: kdevelop-bugs-null
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-01-22 04:29 UTC by Be
Modified: 2020-09-29 14:48 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Be 2019-01-22 04:29:49 UTC
SUMMARY
Something is wrong with the C++ indexer in 5.3.1 but I'm not exactly sure what's going wrong. There are lots of classes that don't get resolved. I see errors like "member access to incomplete type" and other errors related to incomplete types even though the header file for that class is #included. When I open the header file for those classes which the indexer isn't resolving, there is a warning which says "Header is not guarded against multiple inclusions", which is wrong. I can get that warning to go away by clicking the refresh button in the Problems area, but when I switch to another file then switch back to that header, the erroneous warning comes back.

I have tried reopening the project and clearing the cache (both multiple times), but the problem persists.

This is a regression. KDevelop used to parse this code fine. I don't know what the last working version was.

STEPS TO REPRODUCE
1. Download code from https://github.com/kshitij98/mixxx/tree/effects_refactoring
2. Set up KDevelop project as described at https://mixxx.org/wiki/doku.php/kdevelop
3. Open src/effects/effectslot.cpp

OBSERVED RESULT
lots of unresolved symbols

EXPECTED RESULT
All symbols resolved, able to use "show uses", "jump to declaration", and "jump to definition features" with accurate and complete results.

SOFTWARE/OS VERSIONS
GNOME 3.30.2
KDE Frameworks Version: 5.53 
Qt Version: 5.11.1
OS: Fedora 29, using KDevelop package from Fedora
Comment 1 Alexandre Courbot 2019-02-02 07:44:39 UTC
I am seeing this as well, both with C and C++ projects. This severely impacts KDevelop's usability.

It looks like this warning is more the result of a parsing failure than an actual false positive. If that was the case, then I suspect the file would still be parsed nonetheless, while currently none of the symbols are resolved.
Comment 2 Alexandre Courbot 2019-02-02 10:51:24 UTC
By the way, do you know which version of clang your KDevelop is linked against? (clang --version is probably a realiable way to get it) I suspect that this may be due to clang 7, as another machine of mine, which uses older packages, seems to be working fine AFAICT (I have compiled KDevelop myself on both). I don't have access to it yet, but should be able to confirm both the behavior and clang version next week.
Comment 3 Alexandre Courbot 2019-02-02 11:58:50 UTC
It seems to be confirmed that the issue is with clang 7. I have downloaded and run the official 5.3.1 AppImage and it works just fine. The AppImage embeds clang6. I suppose we can use this as a workaround until the issue is properly fixed.
Comment 4 Be 2019-02-02 15:45:29 UTC
Thank you for investigating. Yes, Fedora 29 ships Clang 7. I downloaded the AppImage and these errors no longer appear.
Comment 5 Alexandre Courbot 2019-02-03 03:05:00 UTC
Sadly the AppImage is also crashing regularly for me. :/
Comment 6 Francis Herne 2020-09-29 14:48:48 UTC
Is this still an issue with current Clang versions?


(I attempted to build the example project, but it doesn't seem to work with current SCons).