From 4b12ba0ce6684f2b5f3462f70d6c35de162cf31a Mon Sep 17 00:00:00 2001 From: Douglas Gregor Date: Tue, 17 Jul 2012 23:09:36 +0000 Subject: [PATCH] Improve comment for TypeDecl::getTypeForDecl(), from Sean Silva! llvm-svn: 160405 --- clang/include/clang/AST/Decl.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/clang/include/clang/AST/Decl.h b/clang/include/clang/AST/Decl.h index 82f3c597d1a6..e9f25b368aad 100644 --- a/clang/include/clang/AST/Decl.h +++ b/clang/include/clang/AST/Decl.h @@ -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; } -- GitLab