]> granicus.if.org Git - clang/commitdiff
Use only one constructor for CXXMethodDecl. Keep initialization stuff into one place.
authorArgyrios Kyrtzidis <akyrtzi@gmail.com>
Sat, 8 Nov 2008 11:24:06 +0000 (11:24 +0000)
committerArgyrios Kyrtzidis <akyrtzi@gmail.com>
Sat, 8 Nov 2008 11:24:06 +0000 (11:24 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58902 91177308-0d34-0410-b5e6-96231b3b80d8

include/clang/AST/DeclCXX.h
lib/AST/DeclCXX.cpp

index 0c230e767548e194fddb945663cc401e3f3aca0b..51d1a935f00db93539d438388092dfe7044c5982 100644 (file)
@@ -391,12 +391,6 @@ protected:
 /// 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,
index b2878b667aa74d9c320689ac97e5fcb213504a30..d008544074f966ce8d4ba00be8a316de5400b28d 100644 (file)
@@ -117,7 +117,7 @@ CXXMethodDecl::Create(ASTContext &C, CXXRecordDecl *RD,
                       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 {