diff options
author | Douglas Gregor <dgregor@apple.com> | 2012-03-28 16:01:27 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2012-03-28 16:01:27 +0000 |
commit | 6960587df0bd1b421c11715807a4d2302a3aae3c (patch) | |
tree | 816ec998283c43e315732268a37177abc5f5c841 /lib/Sema/SemaTemplate.cpp | |
parent | 1e1e9722cb4ea6027e2c4885c7a8f26d3726ca7d (diff) |
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>.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@153577 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaTemplate.cpp')
-rw-r--r-- | lib/Sema/SemaTemplate.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/Sema/SemaTemplate.cpp b/lib/Sema/SemaTemplate.cpp index 3a4a6f5312..34e5d722ca 100644 --- a/lib/Sema/SemaTemplate.cpp +++ b/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 { |