[cfe-commits] r160405 - /cfe/trunk/include/clang/AST/Decl.h

Douglas Gregor dgregor at apple.com
Tue Jul 17 16:09:36 PDT 2012


Author: dgregor
Date: Tue Jul 17 18:09:36 2012
New Revision: 160405

URL: http://llvm.org/viewvc/llvm-project?rev=160405&view=rev
Log:
Improve comment for TypeDecl::getTypeForDecl(), from Sean Silva!

Modified:
    cfe/trunk/include/clang/AST/Decl.h

Modified: cfe/trunk/include/clang/AST/Decl.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/AST/Decl.h?rev=160405&r1=160404&r2=160405&view=diff
==============================================================================
--- cfe/trunk/include/clang/AST/Decl.h (original)
+++ cfe/trunk/include/clang/AST/Decl.h Tue Jul 17 18:09:36 2012
@@ -2316,7 +2316,10 @@
     : NamedDecl(DK, DC, L, Id), TypeForDecl(0), LocStart(StartL) {}
 
 public:
-  // Low-level accessor
+  // Low-level accessor. If you just want the type defined by this node,
+  // check out ASTContext::getTypeDeclType or one of
+  // ASTContext::getTypedefType, ASTContext::getRecordType, etc. if you
+  // already know the specific kind of node this is.
   const Type *getTypeForDecl() const { return TypeForDecl; }
   void setTypeForDecl(const Type *TD) { TypeForDecl = TD; }
 





More information about the cfe-commits mailing list