Student of prof. Reichenbach with questions on clang ast

Thanks a lot Klimek,

The reason I primarily wanted an AST transformation was the inherent issues with co dependent multiple transformations.

For eg, lets say there is a node A which i just transformed and a predecessor node B which needs to be transformed based on the transformed version of A, i might need to include that transformed A node somewhere or flag it appropriately right?
I will look into that issue

About the macros. Are there any specific code locations I could look at to get this preprocessed token streams to make sense of the macros?

P.S: I have included the clang mailing list. :slight_smile:

Thanks a lot Klimek,

The reason I primarily wanted an AST transformation was the inherent
issues with co dependent multiple transformations.

For eg, lets say there is a node A which i just transformed and a
predecessor node B which needs to be transformed based on the transformed
version of A, i might need to include that transformed A node somewhere or
flag it appropriately right?

Well, generally, changing the AST and re-running an analysis over the AST,
or changing the source code, re-parsing the AST, and then re-running an
analysis should be equivalent in expressiveness.

I will look into that issue

About the macros. Are there any specific code locations I could look at to
get this preprocessed token streams to make sense of the macros?

Look at SourceLocations, which can be resolved via the SourceManager.

Cheers,
/Manuel