[cfe-dev] clang and #if regions

Paul Curtis plc at rowley.co.uk
Wed Dec 8 03:59:41 PST 2010


Hi All,

Out of curiosity, now that I'm using the C interface to clang, is there a
simple way to determine the source lines that were activated for compilation
by the C-preprocessor?  The complement of that, of course, is the set of
lines that did *not* make it through the C pre-processor.

You get where I'm going here--in the IDE I wish to low-light the lines that
are #if'd out.  I just wondered whether there was an easy way to do this.
Looking at the C interface, it looks like it could be expensive.  Or I've
missed something!

I know that the XCode 4 preview I have doesn't do this, or I can't find a
way to do it in XCode.

Thanks,
 
--
Paul Curtis, Rowley Associates Ltd   http://www.rowley.co.uk
SolderCore arriving Winter 2010!   http://www.soldercore.com







More information about the cfe-dev mailing list