overriding visitor methods from class RecursiveASTVisitor for clang front end

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 expression.

then how will overridden methods be invoked?