diff options
author | Douglas Gregor <dgregor@apple.com> | 2009-10-08 15:14:33 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2009-10-08 15:14:33 +0000 |
commit | f6b1185f0a8a209c06dfc1efdb6a59cc851e970c (patch) | |
tree | 32a1f28a10bdce3da2bd6477c6ed113a46c6a3a4 /lib/Sema/SemaType.cpp | |
parent | 251b4ff2578e26959a4c036140ccd61c5e9292f2 (diff) |
Improve checking for specializations of member classes of class
templates, and keep track of how those member classes were
instantiated or specialized.
Make sure that we don't try to instantiate an explicitly-specialized
member class of a class template, when that explicit specialization
was a declaration rather than a definition.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83547 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaType.cpp')
-rw-r--r-- | lib/Sema/SemaType.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/lib/Sema/SemaType.cpp b/lib/Sema/SemaType.cpp index 402bc9db08..da72197f0c 100644 --- a/lib/Sema/SemaType.cpp +++ b/lib/Sema/SemaType.cpp @@ -1849,10 +1849,11 @@ bool Sema::RequireCompleteType(SourceLocation Loc, QualType T, = dyn_cast<CXXRecordDecl>(Record->getDecl())) { if (CXXRecordDecl *Pattern = Rec->getInstantiatedFromMemberClass()) { // This record was instantiated from a class within a template. - return InstantiateClass(Loc, Rec, Pattern, - getTemplateInstantiationArgs(Rec), - TSK_ImplicitInstantiation, - /*Complain=*/diag != 0); + if (Rec->getTemplateSpecializationKind() != TSK_ExplicitSpecialization) + return InstantiateClass(Loc, Rec, Pattern, + getTemplateInstantiationArgs(Rec), + TSK_ImplicitInstantiation, + /*Complain=*/diag != 0); } } } |