Community
Participate
Working Groups
Created attachment 285688 [details] Example files demonstrating the problem in action - Overview of problem: When I use X-macros to create an enum, the indexer and/or code analysis (I'm not sure which) doesn't properly handle the enum values. This results in "Symbol x could not be resolved" errors in the Problems tab when I try to refer to the enum values in code. I have provided a minimal (and nonsensical) program demonstrating the problem in action. - Steps to reproduce: 1) Create a new "C Managed Build" project 2) Add the attached colorlist.def and main.c files as new files in the project 3) Build the project and verify that the code compiles and runs 4) Make sure the Eclipse index is up to date by right-clicking on the project and choosing Index -> Rebuild - Actual results: You will end up with two Semantic Error entries in the Problems tab. Symbol 'Blue' could not be resolved Symbol 'Red' could not be resolved Occasionally I have to close and reopen main.c before these errors begin showing up. - Expected results: There shouldn't be any errors in the Problems tab, and the symbols Red/Blue/Green should be handled as proper symbols by the indexer (e.g. I should be able to do "Shift+Ctrl+G" to find references in the workspace). - Build Date & Hardware: I have been experiencing this issue for many years now on every platform. Ever since I started using Eclipse, which I don't remember what version I started with. - Additional Diagnostics: I enabled several of the indexer debugging options when I launched Eclipse and here is the output I got: Indexer: start PDOMRebuildTask Indexer: parsing /XMacrosTest/main.c Indexer: adding file:/home/doug/eclipse-workspace-cdt-fix/XMacrosTest/colorlist.def Indexer: adding file:/home/doug/eclipse-workspace-cdt-fix/XMacrosTest/main.c Indexer: processed /XMacrosTest/main.c [88 ms] C/C++ Indexer: Project 'XMacrosTest' (1 sources, 1 headers) Options: indexer='PDOMFastIndexer', parseAllFiles=true, unusedHeaders=useC, skipReferences=false, skipImplicitReferences=false, skipTypeReferences=false, skipMacroReferences=false. Database: 8192 bytes Timings: 106 total, 39 parser, 2 resolution, 31 index update. Errors: 0 internal, 0 include, 0 scanner, 0 syntax errors. Names: 14 declarations, 19 references, 0(0.00%) unresolved. Cache[204MB]: 627 hits, 0(0.00%) misses. Indexer: completed PDOMRebuildTask[112ms]
Looks like a case of bug 315964.