Bug 396389 - Indexer does not index correctly if there are #ifdef in header files
Summary: Indexer does not index correctly if there are #ifdef in header files
Status: NEW
Alias: None
Product: CDT
Classification: Tools
Component: cdt-indexer (show other bugs)
Version: 8.0.2   Edit
Hardware: PC Windows XP
: P3 major with 2 votes (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact: Jonah Graham CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-12-12 06:05 EST by Sebastian Wirkert CLA
Modified: 2020-09-04 15:25 EDT (History)
4 users (show)

See Also:


Attachments
Example Eclipse project showing the problem (3.41 KB, application/zip)
2012-12-12 06:05 EST, Sebastian Wirkert CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Sebastian Wirkert CLA 2012-12-12 06:05:03 EST
Often times, we are using the #ifdef directive in header files, as shown in the example zip file (a.h). These seem to pose a problem for the indexer. In the zipped example it does not realize that foo is not present for c.c.
We often have the inverse problem: something is defined (in example by _A_SUBSYSTEM_) but the indexer fails to notice. This poses a severe problem for us, as it results in many wrong Semantic Errors detected by the indexer.
Comment 1 Sebastian Wirkert CLA 2012-12-12 06:05:41 EST
Created attachment 224619 [details]
Example Eclipse project showing the problem
Comment 2 Nathan Ridge CLA 2014-04-16 02:46:49 EDT
My understanding is that using the new "Index all header variants" option (bug 421289) should resolve things like this, but it does not seem to have an effect on this example.