]> granicus.if.org Git - clang/commitdiff
Add some comments to the ASTLocation class.
authorArgyrios Kyrtzidis <akyrtzi@gmail.com>
Mon, 6 Jul 2009 21:35:09 +0000 (21:35 +0000)
committerArgyrios Kyrtzidis <akyrtzi@gmail.com>
Mon, 6 Jul 2009 21:35:09 +0000 (21:35 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74861 91177308-0d34-0410-b5e6-96231b3b80d8

include/clang/Index/ASTLocation.h

index 4404644e56285ba1b0555d15d623f3422db92046..ba401da26a1fcf1831e6c13123262156c51cf611 100644 (file)
@@ -28,6 +28,12 @@ namespace idx {
 
 /// \brief Represents a Decl or a Stmt and its immediate Decl parent. It's
 /// immutable.
+///
+/// ASTLocation is intended to be used as a "pointer" into the AST. It is either
+/// just a Decl, or a Stmt and its Decl parent. Since a single Stmt is devoid
+/// of context, its parent Decl provides all the additional missing information
+/// like the declaration context, ASTContext, etc.
+///
 class ASTLocation {
   Decl *D;
   Stmt *Stm;