summaryrefslogtreecommitdiffstats
path: root/clang/lib/AST/DeclCXX.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/lib/AST/DeclCXX.cpp')
-rw-r--r--clang/lib/AST/DeclCXX.cpp25
1 files changed, 3 insertions, 22 deletions
diff --git a/clang/lib/AST/DeclCXX.cpp b/clang/lib/AST/DeclCXX.cpp
index 59710a55498..857ac19e6b1 100644
--- a/clang/lib/AST/DeclCXX.cpp
+++ b/clang/lib/AST/DeclCXX.cpp
@@ -2253,23 +2253,12 @@ CXXMethodDecl::overridden_methods() const {
return getASTContext().overridden_methods(this);
}
-static QualType getThisObjectType(ASTContext &C, const FunctionProtoType *FPT,
- const CXXRecordDecl *Decl) {
- QualType ClassTy = C.getTypeDeclType(Decl);
- return C.getQualifiedType(ClassTy, FPT->getMethodQuals());
-}
-
QualType CXXMethodDecl::getThisType(const FunctionProtoType *FPT,
const CXXRecordDecl *Decl) {
ASTContext &C = Decl->getASTContext();
- QualType ObjectTy = ::getThisObjectType(C, FPT, Decl);
- return C.getPointerType(ObjectTy);
-}
-
-QualType CXXMethodDecl::getThisObjectType(const FunctionProtoType *FPT,
- const CXXRecordDecl *Decl) {
- ASTContext &C = Decl->getASTContext();
- return ::getThisObjectType(C, FPT, Decl);
+ QualType ClassTy = C.getTypeDeclType(Decl);
+ ClassTy = C.getQualifiedType(ClassTy, FPT->getMethodQuals());
+ return C.getPointerType(ClassTy);
}
QualType CXXMethodDecl::getThisType() const {
@@ -2284,14 +2273,6 @@ QualType CXXMethodDecl::getThisType() const {
getParent());
}
-QualType CXXMethodDecl::getThisObjectType() const {
- // Ditto getThisType.
- assert(isInstance() && "No 'this' for static methods!");
-
- return CXXMethodDecl::getThisObjectType(getType()->getAs<FunctionProtoType>(),
- getParent());
-}
-
bool CXXMethodDecl::hasInlineBody() const {
// If this function is a template instantiation, look at the template from
// which it was instantiated.
OpenPOWER on IntegriCloud