summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohn McCall <rjmccall@apple.com>2009-12-10 21:17:25 +0000
committerJohn McCall <rjmccall@apple.com>2009-12-10 21:17:25 +0000
commit7a2865a2176537c2e7ba93bfc18034dc5fbe4efd (patch)
tree35e1eef0f82ae0070ff18481a7bc588c26746396
parent4b91e0194b6be91da114e0d22dea61358b938760 (diff)
downloadbcm5719-llvm-7a2865a2176537c2e7ba93bfc18034dc5fbe4efd.tar.gz
bcm5719-llvm-7a2865a2176537c2e7ba93bfc18034dc5fbe4efd.zip
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. llvm-svn: 91063
-rw-r--r--clang/test/CXX/dcl.dcl/basic.namespace/namespace.udecl/p11.cpp13
1 files changed, 9 insertions, 4 deletions
diff --git a/clang/test/CXX/dcl.dcl/basic.namespace/namespace.udecl/p11.cpp b/clang/test/CXX/dcl.dcl/basic.namespace/namespace.udecl/p11.cpp
index ce6221216ad..b4302d5b4b9 100644
--- a/clang/test/CXX/dcl.dcl/basic.namespace/namespace.udecl/p11.cpp
+++ b/clang/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 <typename T> class Test0 {
void test() {
int foo(T);
@@ -81,9 +83,12 @@ namespace test5 {
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}}
}
OpenPOWER on IntegriCloud