In the method TraverseFieldDecl of a RecursiveASTVisitor, would it be possible to find all the instantiations of a specific type (RecordDecl) ?
In this particular case, a class X (retrieved via getParent() method) contains a field (parsed by the TraverseFieldDecl) and I would like to check the parameters passed to that class X when instantiated.
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
If you take that direction, then this post may also help you overcome the
'compilation database' requirement of libTooling: