diff options
author | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2008-11-08 11:24:06 +0000 |
---|---|---|
committer | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2008-11-08 11:24:06 +0000 |
commit | 5540a72fe407f77d4155511b508f21a237254092 (patch) | |
tree | 4ec3617618864eca1f7f185641add394a7a4b887 | |
parent | 960627da5a98e788045b81cb32a7db7290c76c35 (diff) |
Use only one constructor for CXXMethodDecl. Keep initialization stuff into one place.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58902 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | include/clang/AST/DeclCXX.h | 6 | ||||
-rw-r--r-- | lib/AST/DeclCXX.cpp | 2 |
2 files changed, 1 insertions, 7 deletions
diff --git a/include/clang/AST/DeclCXX.h b/include/clang/AST/DeclCXX.h index 0c230e7675..51d1a935f0 100644 --- a/include/clang/AST/DeclCXX.h +++ b/include/clang/AST/DeclCXX.h @@ -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, diff --git a/lib/AST/DeclCXX.cpp b/lib/AST/DeclCXX.cpp index b2878b667a..d008544074 100644 --- a/lib/AST/DeclCXX.cpp +++ b/lib/AST/DeclCXX.cpp @@ -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 { |