<div dir="ltr">Please take a look at this clang-tidy check which uses preprocessor callbacks instead of ASTMatchers.<div><br></div><div>  <a href="https://clang.llvm.org/extra/doxygen/IncludeOrderCheck_8cpp_source.html">https://clang.llvm.org/extra/doxygen/IncludeOrderCheck_8cpp_source.html</a><br></div><div><br></div><div>It just reorders them, but you should be able to use it as template...</div><div><br></div><div>hth...</div><div>don</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Oct 31, 2017 at 12:53 PM, Valerio via cfe-dev <span dir="ltr"><<a href="mailto:cfe-dev@lists.llvm.org" target="_blank">cfe-dev@lists.llvm.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi *,<br>
I would like to match and then rewrite “#include” directives, is it possible via libtooling’s API ?<br>
how can I use  ASTMatcher for matching “#include” directives ?<br>
<br>
thanks!<br>
<br>______________________________<wbr>_________________<br>
cfe-dev mailing list<br>
<a href="mailto:cfe-dev@lists.llvm.org">cfe-dev@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/<wbr>mailman/listinfo/cfe-dev</a><br>
<br></blockquote></div><br></div>