r183896 - Make it clear in Decl::hasBody that it can return true on redeclarations.

Manuel Klimek klimek at google.com
Thu Jun 13 02:05:19 PDT 2013


Author: klimek
Date: Thu Jun 13 04:05:19 2013
New Revision: 183896

URL: http://llvm.org/viewvc/llvm-project?rev=183896&view=rev
Log:
Make it clear in Decl::hasBody that it can return true on redeclarations.

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

Modified: cfe/trunk/include/clang/AST/DeclBase.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/AST/DeclBase.h?rev=183896&r1=183895&r2=183896&view=diff
==============================================================================
--- cfe/trunk/include/clang/AST/DeclBase.h (original)
+++ cfe/trunk/include/clang/AST/DeclBase.h Thu Jun 13 04:05:19 2013
@@ -786,8 +786,10 @@ public:
   ///  top-level Stmt* of that body.  Otherwise this method returns null.
   virtual Stmt* getBody() const { return 0; }
 
-  /// \brief Returns true if this Decl represents a declaration for a body of
+  /// \brief Returns true if this \c Decl represents a declaration for a body of
   /// code, such as a function or method definition.
+  /// Note that \c hasBody can also return true if any redeclaration of this
+  /// \c Decl represents a declaration for a body of code.
   virtual bool hasBody() const { return getBody() != 0; }
 
   /// getBodyRBrace - Gets the right brace of the body, if a body exists.





More information about the cfe-commits mailing list