[cfe-dev] [analyzer] How to walk AST template instantiations

Anna Zaks via cfe-dev cfe-dev at lists.llvm.org
Tue Nov 3 01:16:06 PST 2015


> On Nov 3, 2015, at 12:22 AM, Artem Dergachev via cfe-dev <cfe-dev at lists.llvm.org> wrote:
> 
> Hello,
> 
> > What is the best way for analysis AST visitors to visit template
> > instantiations?
> 
> As a quick workaround, you can subscribe on check::EndOfTranslationUnit (which is not a path-sensitive callback,

Can check::ASTDecl<TranslationUnitDecl> be used instead? It’s a better fit for non-path sensitive checkers.

> even though it fires (once) after all path-sensitive callbacks if they are at all triggered) and then use any combinations of StmtVisitor's and DeclVisitor's, or even ASTMatchers, over the TranslationUnitDecl (the whole AST), for very fine-grained control over what stuff you do and do not visit.
> _______________________________________________
> 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