Note that shouldVisitTemplateInstantiations() is set to return true. The issue is that the ParmVarDecl for D<char>::f::c is never visited, while the one for D::f::c is visited twice. As a result, VisitDeclRefExpr visits an expression whose Decl is never visited and I can't bind it
Since D<char>::f::c is present in ast-dump output as a distinct ParmVarDecl node, I guess it should be visited. To do it in a non-hacky and generic way, I guess I need to fix some Traverse* method in RecursiveASTVisitor.h, but I'm a bit clueless as to what goes wrong. I've checked TraverseFunctionHelper and its parameter handling, but can't find anything wrong at a glance. Halp, plz? Any tips appreciated, I'm a rookie.
Note that shouldVisitTemplateInstantiations() is set to return true. The
issue is that the ParmVarDecl for D<char>::f::c is never visited, while the
one for D::f::c is visited twice. As a result, VisitDeclRefExpr visits an
expression whose Decl is never visited and I can't bind it
Since D<char>::f::c is present in ast-dump output as a distinct
ParmVarDecl node, I guess it should be visited. To do it in a non-hacky and
generic way, I guess I need to fix some Traverse* method in
RecursiveASTVisitor.h, but I'm a bit clueless as to what goes wrong. I've
checked TraverseFunctionHelper and its parameter handling, but can't find
anything wrong at a glance. Halp, plz? Any tips appreciated, I'm a rookie.
Which version of clang are you using? I thought this was fixed recently...