diff options
author | Sebastian Redl <sebastian.redl@getdesigned.at> | 2010-08-31 00:36:40 +0000 |
---|---|---|
committer | Sebastian Redl <sebastian.redl@getdesigned.at> | 2010-08-31 00:36:40 +0000 |
commit | 03b16a7d476789d62d61d3e57e75f0bf6a8229bb (patch) | |
tree | 21a42730c14398840c1c2d7c89bd8e2bffb59fd7 /lib/Sema/SemaTemplate.cpp | |
parent | 4e4d57069cf9402728e05f7fc856295a86e4801f (diff) |
Add a forgotten place where the enclosing namespace set matters, plus a big testcase for inline namespace fun.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112565 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaTemplate.cpp')
-rw-r--r-- | lib/Sema/SemaTemplate.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/Sema/SemaTemplate.cpp b/lib/Sema/SemaTemplate.cpp index 47356bc248..e06d38d179 100644 --- a/lib/Sema/SemaTemplate.cpp +++ b/lib/Sema/SemaTemplate.cpp @@ -3440,8 +3440,8 @@ static bool CheckTemplateSpecializationScope(Sema &S, getTemplateSpecializationKind(PrevDecl) == TSK_ImplicitInstantiation)){ // There is no prior declaration of this entity, so this // specialization must be in the same context as the template - // itself. - if (!DC->Equals(SpecializedContext)) { + // itself, or in the enclosing namespace set. + if (!DC->InEnclosingNamespaceSetOf(SpecializedContext)) { if (isa<TranslationUnitDecl>(SpecializedContext)) S.Diag(Loc, diag::err_template_spec_decl_out_of_scope_global) << EntityKind << Specialized; |