[cfe-dev] AST transformations in a plugin
JohnH
jan.hoogerbrugge at gmail.com
Wed Jan 23 10:19:51 PST 2013
Hi,
I am new to clang so perhaps this is a beginners question....
I am trying to add some instrumentation code and I want to use a plugin for
that. I use Rewriter to
build new code where the new code consists of pretty printed ASTs with my
own instrumentation
code. Is this the way to do this? The first problem that I encountered is
that the new code is not
passed further down the compilation chain but gets stored in a
RewriteBuffer. Should I somehow
re-parse this code?
Is tooling::RefactoringTool a better method to use than Rewriter? If so, are
there examples available?
Finally a question about plugins. Are they compatible between clang
versions? (I am afraid that they are not).
Regards,
John
--
View this message in context: http://clang-developers.42468.n3.nabble.com/AST-transformations-in-a-plugin-tp4029993.html
Sent from the Clang Developers mailing list archive at Nabble.com.
More information about the cfe-dev
mailing list