summaryrefslogtreecommitdiff
path: root/test/SemaTemplate/dependent-names-no-std.cpp
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2011-06-12 15:46:16 +0000
committerDimitry Andric <dim@FreeBSD.org>2011-06-12 15:46:16 +0000
commit29cafa66ad3878dbb9f82615f19fa0bded2e443c (patch)
treec5e9e10bc189de0058aa763c47b9920a8351b7df /test/SemaTemplate/dependent-names-no-std.cpp
parent01af97d3b23bded2b2b21af19bbc6e4cce49e5b3 (diff)
Diffstat (limited to 'test/SemaTemplate/dependent-names-no-std.cpp')
-rw-r--r--test/SemaTemplate/dependent-names-no-std.cpp21
1 files changed, 21 insertions, 0 deletions
diff --git a/test/SemaTemplate/dependent-names-no-std.cpp b/test/SemaTemplate/dependent-names-no-std.cpp
new file mode 100644
index 0000000000000..e9ac99faf65b4
--- /dev/null
+++ b/test/SemaTemplate/dependent-names-no-std.cpp
@@ -0,0 +1,21 @@
+// RUN: %clang_cc1 -fsyntax-only -verify %s
+//
+// The whole point of this test is to verify certain diagnostics work in the
+// absence of namespace 'std'.
+
+namespace PR10053 {
+ namespace ns {
+ struct Data {};
+ }
+
+ template<typename T> struct A {
+ T t;
+ A() {
+ f(t); // expected-error {{call to function 'f' that is neither visible in the template definition nor found by argument dependent lookup}}
+ }
+ };
+
+ void f(ns::Data); // expected-note {{in namespace 'PR10053::ns'}}
+
+ A<ns::Data> a; // expected-note {{in instantiation of member function}}
+}