summaryrefslogtreecommitdiffstats
path: root/lib/AST/DeclCXX.cpp
diff options
context:
space:
mode:
authored <ed@FreeBSD.org>2009-06-14 09:24:02 +0000
committered <ed@FreeBSD.org>2009-06-14 09:24:02 +0000
commitb8e7410b22fa573fb0078712439f343bc69208dd (patch)
treed472a7615b5c7e413aa62a77d0777c1a9cf76478 /lib/AST/DeclCXX.cpp
parent6514d87c1aa5b544d02c3822fe41217e2051673d (diff)
downloadFreeBSD-src-b8e7410b22fa573fb0078712439f343bc69208dd.zip
FreeBSD-src-b8e7410b22fa573fb0078712439f343bc69208dd.tar.gz
Import Clang r73340.
Diffstat (limited to 'lib/AST/DeclCXX.cpp')
-rw-r--r--lib/AST/DeclCXX.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/AST/DeclCXX.cpp b/lib/AST/DeclCXX.cpp
index 94daf48..8430da2 100644
--- a/lib/AST/DeclCXX.cpp
+++ b/lib/AST/DeclCXX.cpp
@@ -260,7 +260,12 @@ QualType CXXMethodDecl::getThisType(ASTContext &C) const {
// the type of this is const volatile X*.
assert(isInstance() && "No 'this' for static methods!");
- QualType ClassTy = C.getTagDeclType(const_cast<CXXRecordDecl*>(getParent()));
+
+ QualType ClassTy;
+ if (ClassTemplateDecl *TD = getParent()->getDescribedClassTemplate())
+ ClassTy = TD->getInjectedClassNameType(C);
+ else
+ ClassTy = C.getTagDeclType(const_cast<CXXRecordDecl*>(getParent()));
ClassTy = ClassTy.getWithAdditionalQualifiers(getTypeQualifiers());
return C.getPointerType(ClassTy).withConst();
}
OpenPOWER on IntegriCloud