[cfe-dev] Header Pasting and ASTMatchers

Benjamin Kramer via cfe-dev cfe-dev at lists.llvm.org
Mon Dec 12 03:41:58 PST 2016


You shouldn't be seeing the AST twice. Can you show the code where you
set up PPCallbacks?

On Sun, Dec 11, 2016 at 10:23 PM, Farzad Sadeghi via cfe-dev
<cfe-dev at lists.llvm.org> wrote:
> I have an ASTFronendAction that runs some matchers and has some PPCallbacks.
> Ever since i added the PPCallbacks, I'm getting the AST of a source
> file that has the headers actually pasted at the top of it, so if
> something's in an included file, i'm matching it twice.
> is there a way to check for that when a MatchFinder::Callback is
> called or is there a way to tell the Preprocessor to not paste the
> headers at the top of the source files that included them?
>
> --
> Farzad Sadeghi
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev



More information about the cfe-dev mailing list