]> granicus.if.org Git - clang/commitdiff
Improve comment for TypeDecl::getTypeForDecl(), from Sean Silva!
authorDouglas Gregor <dgregor@apple.com>
Tue, 17 Jul 2012 23:09:36 +0000 (23:09 +0000)
committerDouglas Gregor <dgregor@apple.com>
Tue, 17 Jul 2012 23:09:36 +0000 (23:09 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160405 91177308-0d34-0410-b5e6-96231b3b80d8

include/clang/AST/Decl.h

index 82f3c597d1a60174b915e4837e4f615434d36016..e9f25b368aadf88a34a238c56d109a87d31be406 100644 (file)
@@ -2316,7 +2316,10 @@ protected:
     : 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; }