summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/SemaTemplate.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2009-10-12 23:11:44 +0000
committerDouglas Gregor <dgregor@apple.com>2009-10-12 23:11:44 +0000
commitef06ccf8d0aa401aef79102a1c5c1e1b4a4815a2 (patch)
treeb8f09a7f0a8a0d8af999cd7030538fad7e202474 /clang/lib/Sema/SemaTemplate.cpp
parent0f58bec599eefcd81bd5c986939afb784af7ca98 (diff)
downloadbcm5719-llvm-ef06ccf8d0aa401aef79102a1c5c1e1b4a4815a2.tar.gz
bcm5719-llvm-ef06ccf8d0aa401aef79102a1c5c1e1b4a4815a2.zip
When declaring a class template whose name is qualified, make sure
that the scope in which it is being declared is complete. Also, when instantiating a member class template's ClassTemplateDecl, be sure to delay type creation so that the resulting type is dependent. Ick. llvm-svn: 83923
Diffstat (limited to 'clang/lib/Sema/SemaTemplate.cpp')
-rw-r--r--clang/lib/Sema/SemaTemplate.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/clang/lib/Sema/SemaTemplate.cpp b/clang/lib/Sema/SemaTemplate.cpp
index 8ca9089c5e3..9d39ddbe68f 100644
--- a/clang/lib/Sema/SemaTemplate.cpp
+++ b/clang/lib/Sema/SemaTemplate.cpp
@@ -574,6 +574,9 @@ Sema::CheckClassTemplate(Scope *S, unsigned TagSpec, TagUseKind TUK,
DeclContext *SemanticContext;
LookupResult Previous;
if (SS.isNotEmpty() && !SS.isInvalid()) {
+ if (RequireCompleteDeclContext(SS))
+ return true;
+
SemanticContext = computeDeclContext(SS, true);
if (!SemanticContext) {
// FIXME: Produce a reasonable diagnostic here
OpenPOWER on IntegriCloud