[cfe-dev] clang and #if regions
Paul Curtis
plc at rowley.co.uk
Wed Dec 8 06:43:32 PST 2010
Hi Benoit,
> Quoting "Paul Curtis" <plc at rowley.co.uk>:
>
> > 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.
>
> I still did not had the time to experiment it, but you are probably
> searching for this:
>
> http://clang.llvm.org/doxygen/classclang_1_1PPCallbacks.html
>
> "This interface provides a way to observe the actions of the
> preprocessor as it does its thing. Clients can define their
> hooks here to implement preprocessor level tools."
This looks promising, but that means directly hooking into the underlying
clang classes rather than going through the insulating C API? I was sort of
hoping for something that could just pop out of the woodwork, but if it
means I need to roll up my sleeves, then I guess it's time to do some
digging. :-)
Regards,
--
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