Chandler Carruth | 45cad4a | 2011-06-08 10:13:17 +0000 | [diff] [blame] | 1 | // RUN: %clang_cc1 -fsyntax-only -verify %s |
| 2 | // |
| 3 | // The whole point of this test is to verify certain diagnostics work in the |
| 4 | // absence of namespace 'std'. |
| 5 | |
| 6 | namespace PR10053 { |
| 7 | namespace ns { |
| 8 | struct Data {}; |
| 9 | } |
| 10 | |
| 11 | template<typename T> struct A { |
| 12 | T t; |
| 13 | A() { |
Jay Foad | 2a00b83 | 2011-06-14 12:59:25 +0000 | [diff] [blame] | 14 | f(t); // expected-error {{call to function 'f' that is neither visible in the template definition nor found by argument-dependent lookup}} |
Chandler Carruth | 45cad4a | 2011-06-08 10:13:17 +0000 | [diff] [blame] | 15 | } |
| 16 | }; |
| 17 | |
| 18 | void f(ns::Data); // expected-note {{in namespace 'PR10053::ns'}} |
| 19 | |
| 20 | A<ns::Data> a; // expected-note {{in instantiation of member function}} |
| 21 | } |