[PATCH] [AST] Don't include RecursiveASTVisitor.h in ASTContext.h

Richard Smith richard at metafoo.co.uk
Fri Jun 14 14:12:07 PDT 2013


LGTM, thanks!

On Fri, Jun 14, 2013 at 12:42 PM, Reid Kleckner <rnk at google.com> wrote:
> The implementation of getParents() doesn't need to be in a header file.
>
> RecursiveASTVisitor.h is full of repeated macro expansion.  Moving this
> include to ASTContext.cpp speeds up compilation of
> LambdaMangleContext.cpp, a small C++ file with few includes, from 3.7s
> to 2.8s for me locally.  I haven't measured a full build, but it can't
> hurt.
>
> I had to fix a few static analyzer files that were depending on
> transitive includes of C++ AST headers.
>
> http://llvm-reviews.chandlerc.com/D982
>
> Files:
>   include/clang/AST/ASTContext.h
>   lib/AST/ASTContext.cpp
>   lib/StaticAnalyzer/Checkers/UndefinedArraySubscriptChecker.cpp
>   lib/StaticAnalyzer/Core/BugReporter.cpp
>
> _______________________________________________
> cfe-commits mailing list
> cfe-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
>



More information about the cfe-commits mailing list