Now the Editor correctly parses the preprocessor directives and greys out the second directive
Currently, the Editor's syntax highlight is not related to the CodeCompletion plugin.
You mentioned code is inside the CodeCompletion plugin, but the editor highlight is related to Scintilla control.
Yes, I were pointing out that visually things were correct, but functionally not.
The workaround simply makes the parser treat the LLVM compiler as it would the GCC compiler, i.e.,
it triggers the AddCompilerPredefinedMacrosGCC code path which is to retrieve the compiler's predefined macros by
invoking it with " -E -dM -x c++ %s nul"
(Caveat : this only works with the LLVM compiler as it responds the same to the parameters as GCC would.)
Having the predefined macros solves 1)having the incorrect info in tooltips and 2)Find declaration misleading you to an inactive declaration.
One last thing - on the Editor side (Scintilla) doesn't take into account that when working with LLVM on Windows it has _MSC_EXTENSIONS defined by default
which results in visually having large sections of code grey'd out (#if defined(_MSC_EXTENSIONS) ... #endif) but that's small beans as
CodeCompetion still parses it correctly and has the right information in tooltips and Find declaration points to the right places.
Regards