[cfe-commits] r74797 - in /cfe/trunk: include/clang/AST/ASTNode.h lib/AST/ASTNode.cpp lib/AST/CMakeLists.txt

Argyrios Kyrtzidis kyrtzidis at apple.com
Mon Jul 6 11:47:03 PDT 2009

On Jul 5, 2009, at 11:21 PM, Ted Kremenek wrote:

> To help answer my own question, is this to be used with the new Index
> library, or does it serve a different purpose?
> On Jul 5, 2009, at 11:19 PM, Ted Kremenek wrote:
>> Hi Argiris,
>> I was a little surprised to see this.  What is the purpose of this
>> class?  Just curious.  I easily could have missed something in
>> previous emails, but the description from the commit message doesn't
>> tell me what problem ASTNode helps address.
>> Ted

The general idea is that a single Stmt/Expr has no "context" so the  
information that you can get out of it is limited.
If you also include its immediate Decl parent (as a pair) you then  
have its declaration context, you can create a ParentMap to get the  
parent expressions, get the ASTContext, SourceManager, etc.

After discussing with Ted, we figured "ASTLocation" is a better name  
and that it belongs more to the Index library.
Thank you Ted for your feedback!


More information about the cfe-commits mailing list