aboutsummaryrefslogtreecommitdiff
path: root/lib/Sema/SemaTemplate.cpp
diff options
context:
space:
mode:
authorRichard Smith <richard-llvm@metafoo.co.uk>2012-04-20 05:42:36 +0000
committerRichard Smith <richard-llvm@metafoo.co.uk>2012-04-20 05:42:36 +0000
commitb2f245e77de13c6619923d6569a947e6dcdd0666 (patch)
tree0ea65aef3cbbf297b41f5f9fcb4d565912ab3fd4 /lib/Sema/SemaTemplate.cpp
parentcc66b08945099b734b05d06179ea85413c69753d (diff)
Fix a bug which creduce found reducing PR12585.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155185 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaTemplate.cpp')
-rw-r--r--lib/Sema/SemaTemplate.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Sema/SemaTemplate.cpp b/lib/Sema/SemaTemplate.cpp
index ff8c4dacc2..a0b996beec 100644
--- a/lib/Sema/SemaTemplate.cpp
+++ b/lib/Sema/SemaTemplate.cpp
@@ -938,7 +938,7 @@ Sema::CheckClassTemplate(Scope *S, unsigned TagSpec, TagUseKind TUK,
while (!OutermostContext->isFileContext())
OutermostContext = OutermostContext->getLookupParent();
- if (PrevDecl &&
+ if (PrevClassTemplate &&
(OutermostContext->Equals(PrevDecl->getDeclContext()) ||
OutermostContext->Encloses(PrevDecl->getDeclContext()))) {
SemanticContext = PrevDecl->getDeclContext();