diff options
author | Douglas Gregor <dgregor@apple.com> | 2009-09-04 22:48:11 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2009-09-04 22:48:11 +0000 |
commit | d0e3daf2b980b505e535d35b432c938c6d0208ef (patch) | |
tree | e503ee747ebf8da57ddddaee8b43fa885c75b7b8 /lib/Sema/SemaType.cpp | |
parent | 4fe95f99a2693f1145785ea5835ba6937e49c730 (diff) |
Improve the AST representation and semantic analysis for extern
templates. We now distinguish between an explicit instantiation
declaration and an explicit instantiation definition, and know not to
instantiate explicit instantiation declarations. Unfortunately, there
is some remaining confusion w.r.t. instantiation of out-of-line member
function definitions that causes trouble here.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81053 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaType.cpp')
-rw-r--r-- | lib/Sema/SemaType.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/Sema/SemaType.cpp b/lib/Sema/SemaType.cpp index 11bbe4e2de..80cdcd5464 100644 --- a/lib/Sema/SemaType.cpp +++ b/lib/Sema/SemaType.cpp @@ -1781,7 +1781,7 @@ bool Sema::RequireCompleteType(SourceLocation Loc, QualType T, if (Loc.isValid()) ClassTemplateSpec->setLocation(Loc); return InstantiateClassTemplateSpecialization(ClassTemplateSpec, - /*ExplicitInstantiation=*/false, + TSK_ImplicitInstantiation, /*Complain=*/diag != 0); } } else if (CXXRecordDecl *Rec @@ -1790,7 +1790,7 @@ bool Sema::RequireCompleteType(SourceLocation Loc, QualType T, // This record was instantiated from a class within a template. return InstantiateClass(Loc, Rec, Pattern, getTemplateInstantiationArgs(Rec), - /*ExplicitInstantiation=*/false, + TSK_ImplicitInstantiation, /*Complain=*/diag != 0); } } |