RecursiveASTVisitor should have an ASTContext available. ASTContext has a
getParents function, which may be of some use. Unfortunately, I haven't
used this part of the ASTContext before, so I can't give any more concrete
advice. As you've seen, it's easier to traverse down the AST than up it.
O
Thanks Richard for the explanation!
| | | |-IfStmt 0x78b6d90
| | | | |-<<>>
| | | | |-<<>>
| | | | |-BinaryOperator 0x78b5f08 'int' '=='
| | | | | |-ImplicitCastExpr 0x78b5eb0 'int'
| | | | | | `-ImplicitCastExpr 0x78b5e58
'example_tree':'enum example_tree_