[cfe-commits] r58902 - in /cfe/trunk: include/clang/AST/DeclCXX.h lib/AST/DeclCXX.cpp

Argiris Kirtzidis akyrtzi at gmail.com
Sat Nov 8 03:24:07 PST 2008


Author: akirtzidis
Date: Sat Nov  8 05:24:06 2008
New Revision: 58902

URL: http://llvm.org/viewvc/llvm-project?rev=58902&view=rev
Log:
Use only one constructor for CXXMethodDecl. Keep initialization stuff into one place.

Modified:
    cfe/trunk/include/clang/AST/DeclCXX.h
    cfe/trunk/lib/AST/DeclCXX.cpp

Modified: cfe/trunk/include/clang/AST/DeclCXX.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/AST/DeclCXX.h?rev=58902&r1=58901&r2=58902&view=diff

==============================================================================
--- cfe/trunk/include/clang/AST/DeclCXX.h (original)
+++ cfe/trunk/include/clang/AST/DeclCXX.h Sat Nov  8 05:24:06 2008
@@ -391,12 +391,6 @@
 /// CXXMethodDecl - Represents a static or instance method of a
 /// struct/union/class.
 class CXXMethodDecl : public FunctionDecl {
-  CXXMethodDecl(CXXRecordDecl *RD, SourceLocation L,
-               IdentifierInfo *Id, QualType T,
-               bool isStatic, bool isInline, ScopedDecl *PrevDecl)
-    : FunctionDecl(CXXMethod, RD, L, Id, T, (isStatic ? Static : None),
-                   isInline, PrevDecl) {}
-
 protected:
   CXXMethodDecl(Kind DK, CXXRecordDecl *RD, SourceLocation L,
                 IdentifierInfo *Id, QualType T,

Modified: cfe/trunk/lib/AST/DeclCXX.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/DeclCXX.cpp?rev=58902&r1=58901&r2=58902&view=diff

==============================================================================
--- cfe/trunk/lib/AST/DeclCXX.cpp (original)
+++ cfe/trunk/lib/AST/DeclCXX.cpp Sat Nov  8 05:24:06 2008
@@ -117,7 +117,7 @@
                       QualType T, bool isStatic, bool isInline,
                       ScopedDecl *PrevDecl) {
   void *Mem = C.getAllocator().Allocate<CXXMethodDecl>();
-  return new (Mem) CXXMethodDecl(RD, L, Id, T, isStatic, isInline, PrevDecl);
+  return new (Mem) CXXMethodDecl(CXXMethod, RD, L, Id, T, isStatic, isInline, PrevDecl);
 }
 
 QualType CXXMethodDecl::getThisType(ASTContext &C) const {





More information about the cfe-commits mailing list