[cfe-dev] Clang does not rewrite expressions with NULL

Andrey Tarasevich tarasevich.andrey at googlemail.com
Thu Jun 30 07:01:29 PDT 2011


Thank you for the answer.

So there is no easy way to rewrite Stmt that have macros defined in
different files. I'll have to write my own functions for calculating
the length of the expression and combine them with
Rewriter.ReplaceText()? Well this is how I did it at the moment, I'm
just curioгs if there are other ways.

Andrey Tarasevich

2011/6/27 Douglas Gregor <dgregor at apple.com>:
>
> Neither. Clang's source locations keep track of macro instantiation history. The 2147677727 location is the encoding for a macro instantiation; see the SourceManager class and (especially) SourceManager::getInstantiationLoc().
>
>        - Doug
>




More information about the cfe-dev mailing list