Version: 4.0.0 (using KDE 4.4.3) OS: Linux If some block of code is wrapped by #ifdef ... #endif, c++ class highlight(and hints) is not working. When I comment #ifdef ... #endif directives, highlight and hints again works. Reproducible: Always Steps to Reproduce: make simple C++ code with #ifdef ... #endif Actual Results: C++ code between directives is not highlight and hints is not popup Expected Results: C++ code must highlight
Its expected that no highlighting takes places in code thats ifdef'ed, unless the define you're using is defined before the ifdef. Flags set in the buildsystem will only work when you're using cmake as we have no support for fetching the compile-flags with other buildsystems.
I'm use CMake as build system. And of course this flags (for example compile with -D_HAVE_FEATURE_) is set at build time. But I can not understand why build time operation impact to code highlighting. Headers are available and source code are available too, so why not highlight code and popup hints??
That is not possible because there could be an #else branch that declares the same function/class as the #ifdef part and hence you'd have clashing declarations. Apart from that most of the time users are not interested in the code that is not being compiled in their current setup, for example if the ifdef'ed code is for another platform or for some feature you're not having. For code-completion and navigation you usually don't want that to show up at all.
*** This bug has been marked as a duplicate of bug 259135 ***
Moving all the bugs from the CPP Parser. It was not well defined the difference between it and C++ Language Support and people kept reporting in both places indistinctively