From 35dfab9cb14b7d368e4922dce786a5e046a61420 Mon Sep 17 00:00:00 2001 From: John McCall Date: Thu, 10 Dec 2009 21:17:25 +0000 Subject: [PATCH] Actually try to trigger the last diagnostic in the declaration-collision test case. Surprisingly, we *do* diagnose one of them. Since we don't really track scopes into instantiation, this has to signal some kind of bug. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91063 91177308-0d34-0410-b5e6-96231b3b80d8 --- .../dcl.dcl/basic.namespace/namespace.udecl/p11.cpp | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/test/CXX/dcl.dcl/basic.namespace/namespace.udecl/p11.cpp b/test/CXX/dcl.dcl/basic.namespace/namespace.udecl/p11.cpp index ce6221216a..b4302d5b4b 100644 --- a/test/CXX/dcl.dcl/basic.namespace/namespace.udecl/p11.cpp +++ b/test/CXX/dcl.dcl/basic.namespace/namespace.udecl/p11.cpp @@ -69,9 +69,11 @@ namespace test4 { }; } -// FIXME: we should be able to diagnose these, but we can't. +// FIXME: we should be able to diagnose both of these, but we can't. +// ...I'm actually not sure why we can diagnose either of them; it's +// probably a bug. namespace test5 { - namespace ns { void foo(int); } + namespace ns { void foo(int); } // expected-note {{target of using declaration}} template class Test0 { void test() { int foo(T); @@ -81,9 +83,12 @@ namespace test5 { template class Test1 { void test() { - using ns::foo; - int foo(T); + using ns::foo; // expected-note {{using declaration}} + int foo(T); // expected-error {{declaration conflicts with target of using declaration already in scope}} } }; + + template class Test0; + template class Test1; // expected-note {{in instantiation of member function}} }