[cfe-dev] relating preprocessing information to syntax trees

Dietmar Ebner ebner at complang.tuwien.ac.at
Tue Apr 14 08:57:37 PDT 2009


> One relatively straight-forward way to implement this is to implement
> PPCallbacks when parsing the file. This interface gets notified when a
> #include or #define is seen. It can just push directives seen onto a
> list. When your ASTConsumer sees a decl, it would just associate all
> directives in the list with the declaration it just saw.
I did as you suggested and it seems to work fine.

Thanks!

-
Dietmar



More information about the cfe-dev mailing list