Eclipse call hierarchy skips calls in undefined #ifdef regions

Posted by stupakov on Stack Overflow See other posts from Stack Overflow or by stupakov
Published on 2010-05-20T18:37:19Z Indexed on 2010/05/20 18:40 UTC
Read the original article Hit count: 210

Filed under:

Hi all,

The "call hierarchy" and "declaration" features in Eclipse CDT omit results that exist in undefined (greyed out) #ifdef regions.

Example:

void blah(void) {
#ifndef ABC  
   foo();
#else         //line is greyed out
   bar();     //line is greyed out
#endif        //line is greyed out
}

The call hierarchy for foo() will list blah() as a caller; the call hierarchy for bar() will not list blah().

I'm not expecting it to do full resolution of which #define blocks will get compiled, I simply would like it to return all calls/declarations of the function I'm searching for, regardless of the #define blocks that surround it.

Other IDEs such as SlickEdit are able to do this.

Does anyone know of a way to get Eclipse to adopt this behavior?

Thanks.

© Stack Overflow or respective owner

Related posts about eclipse