summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/SemaTemplate.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2012-03-28 16:01:27 +0000
committerDouglas Gregor <dgregor@apple.com>2012-03-28 16:01:27 +0000
commitb7d17ddbf918b52f855537f16b7a7942b8d54aea (patch)
tree77daf5bab2e86f15a64a2dc97bf3f55cdc7675b3 /clang/lib/Sema/SemaTemplate.cpp
parentaa9e4a5e590985f9e58a1efb83cb5cb10964fbbf (diff)
downloadbcm5719-llvm-b7d17ddbf918b52f855537f16b7a7942b8d54aea.tar.gz
bcm5719-llvm-b7d17ddbf918b52f855537f16b7a7942b8d54aea.zip
Unify and fix our checking of C++ [dcl.meaning]p1's requirements
concerning qualified declarator-ids. We now diagnose extraneous qualification at namespace scope (which we had previously missed) and diagnose these qualification errors for all kinds of declarations; it was rather uneven before. Fixes <rdar://problem/11135644>. llvm-svn: 153577
Diffstat (limited to 'clang/lib/Sema/SemaTemplate.cpp')
-rw-r--r--clang/lib/Sema/SemaTemplate.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/clang/lib/Sema/SemaTemplate.cpp b/clang/lib/Sema/SemaTemplate.cpp
index 3a4a6f5312e..34e5d722ca8 100644
--- a/clang/lib/Sema/SemaTemplate.cpp
+++ b/clang/lib/Sema/SemaTemplate.cpp
@@ -887,9 +887,8 @@ Sema::CheckClassTemplate(Scope *S, unsigned TagSpec, TagUseKind TUK,
ContextRAII SavedContext(*this, SemanticContext);
if (RebuildTemplateParamsInCurrentInstantiation(TemplateParams))
Invalid = true;
- } else if (CurContext->isRecord() && TUK != TUK_Friend &&
- TUK != TUK_Reference)
- diagnoseQualifiedDeclInClass(SS, SemanticContext, Name, NameLoc);
+ } else if (TUK != TUK_Friend && TUK != TUK_Reference)
+ diagnoseQualifiedDeclaration(SS, SemanticContext, Name, NameLoc);
LookupQualifiedName(Previous, SemanticContext);
} else {
OpenPOWER on IntegriCloud