[cfe-dev] Could I get the Parent AST of a Stmt?

周书林 via cfe-dev cfe-dev at lists.llvm.org
Thu Dec 31 23:16:16 PST 2015


In my clang-tool, I want to do some analysis on AST after visit some
specific type of Stmt Node. So I need to go to the parent AST node of
current stmt. Is there any member functions of Stmt to archieve this goal?
For example, I am visiting the AST node StringLiteral "xmloption", how can
I get to the Node InitListExpr "config_generic"?(I am using the
VisitStringLiteral() function to visit the StringLiteral Node).

[image: 内嵌图片 1]
Thanks a lot!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20160101/ac081e34/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 2016-01-01 15:12:54的屏幕截图.png
Type: image/png
Size: 37504 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20160101/ac081e34/attachment-0001.png>


More information about the cfe-dev mailing list