[cfe-commits] r91063 - /cfe/trunk/test/CXX/dcl.dcl/basic.namespace/namespace.udecl/p11.cpp

John McCall rjmccall at apple.com
Thu Dec 10 13:17:25 PST 2009


Author: rjmccall
Date: Thu Dec 10 15:17:25 2009
New Revision: 91063

URL: http://llvm.org/viewvc/llvm-project?rev=91063&view=rev
Log:
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.


Modified:
    cfe/trunk/test/CXX/dcl.dcl/basic.namespace/namespace.udecl/p11.cpp

Modified: cfe/trunk/test/CXX/dcl.dcl/basic.namespace/namespace.udecl/p11.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CXX/dcl.dcl/basic.namespace/namespace.udecl/p11.cpp?rev=91063&r1=91062&r2=91063&view=diff

==============================================================================
--- cfe/trunk/test/CXX/dcl.dcl/basic.namespace/namespace.udecl/p11.cpp (original)
+++ cfe/trunk/test/CXX/dcl.dcl/basic.namespace/namespace.udecl/p11.cpp Thu Dec 10 15:17:25 2009
@@ -69,9 +69,11 @@
   };
 }
 
-// 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 <typename T> class Test0 {
     void test() {
       int foo(T);
@@ -81,9 +83,12 @@
 
   template <typename T> 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<int>;
+  template class Test1<int>; // expected-note {{in instantiation of member function}}
 }
 





More information about the cfe-commits mailing list