<div dir="ltr"><div><div><div><div>I am learning to visiting ast to collect some information by API of libTooling.<br></div><div>When I process the source file of postfix-3.0.3/src/global/mail_params.c, I met something strange.<br></div>When
I visit the AST by VisitStmt(), I could find that there would be a sub
level of "InitListExpr" in the first level of "InitListExpr" as attachment shown.<br><div id="gmail_o6ng1v8nq6bv" style="display:inline-block"><div><br></div></div><br></div>However,
when I want to visit the parent AST of StringLiteral by
VisitStringLiteral(), the sub level of "InitListExpr" is gone, I can
only get the higher level "InitListExpr".<br></div><div>I get the parent AST by using "CompilerInstance.getASTContext().getParents(Stmt*)".<br></div>So, how to visit the same AST in these two methods?<br></div>Thank you a lot !</div>