[cfe-dev] Clang Plugin - RecursiveASTVisitor : Find instantiations of a type (RecordDecl)

KrishnaPG krishnapg at yahoo.com
Wed Jul 2 07:10:29 PDT 2014


I am not an expert on this subject, but I believe - AST Matchers should help
in this. Please check the docs:
http://clang.llvm.org/docs/LibASTMatchers.html

Specifically, you are looking for 'Stmt'. It should help you find the nodes
at the statement level, and you should be able to craft a DeclarationMatcher
that filters the statements based on exact criteria you specified in your
question.

If you take that direction, then this post may also help you overcome the
'compilation database' requirement of libTooling:
http://my-classes.com/2014/07/01/working-with-ast-matcher-without-clangtool-compilation-database/

Hope this helps.

Thank you,
GK (Gopalakrishna)
http://gk.palem.in/ 



--
View this message in context: http://clang-developers.42468.n3.nabble.com/Clang-Plugin-RecursiveASTVisitor-Find-instantiations-of-a-type-RecordDecl-tp4040272p4040315.html
Sent from the Clang Developers mailing list archive at Nabble.com.



More information about the cfe-dev mailing list