[cfe-dev] Instantiate ParentMap
jordan_rose at apple.com
Tue Nov 27 09:52:23 PST 2012
Hi, Rambo. The ParentMap in AST is a very simple object: you just give it a top-level statement (usually your entire function body) and it recursively builds the map for you. If you're working in the static analyzer or with the analysis-based compiler warnings, the AnalysisDeclContext has a ParentMap already built (to save you the trouble of recreating it, and also to automatically handle constructor initializers).
ASTMatchers has its own ParentMapASTVisitor, which builds a map of not just statements but also other types of AST nodes. I'm not so familiar with how this one works.
On Nov 20, 2012, at 18:08 , Rambo <hunanlwm at sina.cn> wrote:
> How to Instantiate the ParentMap,somebody would give me an example,Thank
> Best regards,
> View this message in context: http://clang-developers.42468.n3.nabble.com/Instantiate-ParentMap-tp4028392.html
> Sent from the Clang Developers mailing list archive at Nabble.com.
> cfe-dev mailing list
> cfe-dev at cs.uiuc.edu
More information about the cfe-dev