I am learning how to build a tool for parsing C using libtooling of clang.
I'm using a RecursiveASTVisitor
-inherited class, so all its traverse and visitor methods are available.
I wonder if I can determine the parent function node of a statement when overriding method VisitStmt(Stmt *s)
. For example here, can I get a FunctionDecl*
from s
?
Thanks.