Bug 345065 - Parser not working correctly with defines added to the include manager
Summary: Parser not working correctly with defines added to the include manager
Status: REPORTED
Alias: None
Product: kdevelop
Classification: Applications
Component: Language Support: CPP (old) (other bugs)
Version First Reported In: unspecified
Platform: Ubuntu Linux
: NOR normal
Target Milestone: ---
Assignee: kdevelop-bugs-null
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-03-11 20:28 UTC by Ian H
Modified: 2021-03-09 22:48 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ian H 2015-03-11 20:28:11 UTC
the version i'm using is not available on the list, im using 4.7.1

extra defines used in the code (but not defined in the code) do not get parsed correctly with the background parser, but do get parsed correctly with the full reparse of closing and reopening kdevelop. 

these defines are being defined in the define section of the project manager.

a define example would be something like:
#if(THIS_IS_DEFINED==1)
#endif
where THIS_IS_DEFINED is defined as some number in the project manager define.

this DOES work correctly with a full reparse, but not just updating the code.


Reproducible: Always

Steps to Reproduce:
1. add a variable inside one of the if defines inside a header file
2. go to a file that uses the variable inside of the define from that header file
3. start typing the name of the variable or one of the methods that the class of the variable has

Actual Results:  
the code completion will not show the correct class type, and will tell you the variable doesnt exist(sometimes)

Expected Results:  
reparsing the code should have shown the correct type in the code completion
Comment 1 Sergey Kalinichev 2015-03-16 08:39:52 UTC
Yes, that's a known bug in the oldcpp ParsingEnvironment. To work-around it there is a check button in includes/defines manager: "Reparse project".  Also you could try to use the kdev-clang plugin, this bug's been fixed there.
Comment 2 Ian H 2015-03-16 13:24:34 UTC
well, i do use the reparse project... but im currently in the process of changing a ton of code and i really cant wait for the hour and a half it takes to parse the code. 

Any idea when the clang plugin will make it into the main build? i cannot seem to get the source code for the plugin... or a precompiled binary for it. attempting to clone the git for it just sits there and does nothing.
Comment 3 Ian H 2015-03-16 13:33:31 UTC
got the source code finally... but it wont seem to compile.. says it is missing some file ECM.
Comment 4 Kevin Funk 2015-03-16 13:57:41 UTC
You need to install ECM from extra-cmake-modules.git -- But please continue on the mailing list or IRC if you have further problems -- it's not related to this bug report.
Comment 5 Justin Zobel 2021-03-09 22:48:51 UTC
Thank you for the bug report.

As this report hasn't seen any changes in 5 years or more, we ask if you can please confirm that the issue still persists.

If this bug is no longer persisting or relevant please change the status to resolved.