[cfe-dev] overriding visitor methods from class RecursiveASTVisitor for clang front end
rks at cse.iitb.ac.in
Fri Nov 2 03:32:07 PDT 2012
Is there any concept of level or hierarchy of classes that are
inherited separately from RecursiveASTVisitor? because statements in
CFGElement have hierarchy.
Say, we inherit class A and class B from RecursiveASTVisitor
class RecursiveASTVisitor has visitor functions VisitSa1Stmt(),
VisitSa2Stmt() and VisitSb1Stmt(), VisitSb2Stmt().
class A has overridden VisitSa1Stmt(), VisitSa2Stmt() and it is
creating CFG, calling TraverseStmt() method on instance of class B
class B has overridden VisitSb1Stmt(), VisitSb1Stmt()
Sa*Stmt may contain Sb*Stmt, e.g. then clause of IfStmt can contain
assignment statements that has another binary operation in rhs
then how will overridden methods be invoked?
More information about the cfe-dev