Hi!<div><br></div><div>I've faced an annoying issue with C++ parser. It does not enable declaration-definition navigation if it decides the code is not compiled due to conditional compilation.</div><div>It is really predictable behavior but it is an issue if macro is not defined in any header file but defined as compiler command line option.</div>
<div><br></div><div>The main question is: Is it possible to tell the parser that some macro is actually defined somewhere in universe and it shall threat it as defined while parsing the source code.</div><div><br></div><div>
Any way, it would be useful to set macro value for parsing  as it is done for custom include paths.</div><div>  </div><div>Here is a code snippet to play with.</div><div><div>---8<----8<----8<----8<----</div></div>
<div><br></div><div>// Uncomment the line below to get the class parsed</div><div><div>// #define HAS_FEATURE</div><div><br></div><div>#ifdef HAS_FEATURE</div><div><br></div><div>class Test {</div><div>    // Declaration-definition navigation popup does not work until HAS_FEATURE is defined. Uncomment line #2 to check</div>
<div>    void method();</div><div>};</div><div><br></div><div>// Declaration-definition navigation  popup does not work until HAS_FEATURE is defined. Uncomment line #2 to check</div><div>void Test::method()</div><div>{</div>
<div><br></div><div>}</div><div><br></div><div>#endif</div></div><div><br></div><div>------8<----8<----8<----8<----</div><div><br></div><div><div>Put it in some folder and import as new 'Custom Makefile project'</div>
<div><br></div><div>Uncomment line #2 to get navigation popup working on Test::method() declaration/definition.</div></div><div>With the snippet above I'd like to have some quite simple UI to mark macro  HAS_FEATURE defined. It would be applicable for current folder only for example, or folder with sub folders just like for custom include paths.</div>
<div><br></div><div><div> "The issue" appears on both kdevelop's 4.3 branch and master as well. Kdevplatform/kdevelop are build from source.</div><div>If it is already possible to to it is quite tricky to find it ;-)</div>
</div><div><br></div><div>Thanks a lot, Eugene Agafonov.</div>