summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/SemaTemplate.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2011-11-01 21:35:16 +0000
committerDouglas Gregor <dgregor@apple.com>2011-11-01 21:35:16 +0000
commitfe0055e6c879f8bf1b1a7fc2858f3d422dffa514 (patch)
tree40fc77d4079f93c8642e375fd2e9a56bd13ec50f /clang/lib/Sema/SemaTemplate.cpp
parent8188c8a1f30ade4f0e6220a9809a10ca3b185b00 (diff)
downloadbcm5719-llvm-fe0055e6c879f8bf1b1a7fc2858f3d422dffa514.tar.gz
bcm5719-llvm-fe0055e6c879f8bf1b1a7fc2858f3d422dffa514.zip
When we see an out-of-line definition of a member class template that
does not match any declaration in the class (or class template), be sure to mark it as invalid. Fixes PR10924 / <rdar://problem/10119422>. llvm-svn: 143504
Diffstat (limited to 'clang/lib/Sema/SemaTemplate.cpp')
-rw-r--r--clang/lib/Sema/SemaTemplate.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/clang/lib/Sema/SemaTemplate.cpp b/clang/lib/Sema/SemaTemplate.cpp
index de0193c61d4..41c62550e88 100644
--- a/clang/lib/Sema/SemaTemplate.cpp
+++ b/clang/lib/Sema/SemaTemplate.cpp
@@ -989,9 +989,11 @@ Sema::CheckClassTemplate(Scope *S, unsigned TagSpec, TagUseKind TUK,
// If the name of the template was qualified, we must be defining the
// template out-of-line.
if (!SS.isInvalid() && !Invalid && !PrevClassTemplate &&
- !(TUK == TUK_Friend && CurContext->isDependentContext()))
+ !(TUK == TUK_Friend && CurContext->isDependentContext())) {
Diag(NameLoc, diag::err_member_def_does_not_match)
<< Name << SemanticContext << SS.getRange();
+ Invalid = true;
+ }
}
CXXRecordDecl *NewClass =
OpenPOWER on IntegriCloud