libtooling: how to parse #include directive

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

libtooling: how to parse #include directive

Eric Fiselier via cfe-dev
Hi *,
I would like to match and then rewrite “#include” directives, is it possible via libtooling’s API ?
how can I use  ASTMatcher for matching “#include” directives ?

thanks!

_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev

signature.asc (849 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: libtooling: how to parse #include directive

Eric Fiselier via cfe-dev
Please take a look at this clang-tidy check which uses preprocessor callbacks instead of ASTMatchers.


It just reorders them, but you should be able to use it as template...

hth...
don

On Tue, Oct 31, 2017 at 12:53 PM, Valerio via cfe-dev <[hidden email]> wrote:
Hi *,
I would like to match and then rewrite “#include” directives, is it possible via libtooling’s API ?
how can I use  ASTMatcher for matching “#include” directives ?

thanks!

_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev



_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev