Community
Participate
Working Groups
Using 8.1.0.201201271714 (but I've seen this for months, just found solid repro) test.cpp: class Bar { void func(); int field; }; void Bar::func() { field; func(); } #if 0 MY_MACRO #endif 1. Add MY_MACRO to Symbols in project properties 2. Find references on 'field' or 'func'. 3. No references are found. If you remove or comment out MY_MACRO, references are found. Also, if the code is in a header, it works.
Also happens on 8.0.1.
(In reply to comment #1) > Also happens on 8.0.1. Uhh, now it's working on 8.0.1, maybe I tested that wrong and put it in the header and didn't include it. If I comment count the significant macro stuff in PDOMFile.Finder.compare then it works again so it looks like it might be a regression introduced with bug 197989.
(In reply to comment #2) > If I comment count I meant comment out.
Tested again with 8.1.0.201203060448.
Fixed by commit http://git.eclipse.org/c/cdt/org.eclipse.cdt.git/commit/?id=65a29165c20d6a4546853eee11fd88eafb2250f6.
*** cdt git genie on behalf of sprigogin *** Bug 370146 - No references in class defined in file containing inactive code that references a macro [*] http://git.eclipse.org/c/cdt/org.eclipse.cdt.git/commit/?id=65a29165c20d6a4546853eee11fd88eafb2250f6