Francois Pichet | 0f74d1e | 2011-09-07 00:14:57 +0000 | [diff] [blame^] | 1 | // RUN: %clang_cc1 -fms-extensions -fsyntax-only -verify %s |
| 2 | |
| 3 | |
| 4 | template <class T> |
| 5 | class A { |
| 6 | public: |
| 7 | void f(T a) { }// expected-note {{must qualify identifier to find this declaration in dependent base class}} |
| 8 | void g();// expected-note {{must qualify identifier to find this declaration in dependent base class}} |
| 9 | }; |
| 10 | |
| 11 | |
| 12 | template <class T> |
| 13 | class B : public A<T> { |
| 14 | public: |
| 15 | void z(T a) |
| 16 | { |
| 17 | f(a); // expected-warning {{use of identifier 'f' found via unqualified lookup into dependent bases of class templates is a Microsoft extension}} |
| 18 | g(); // expected-warning {{use of identifier 'g' found via unqualified lookup into dependent bases of class templates is a Microsoft extension}} |
| 19 | } |
| 20 | }; |
| 21 | |
| 22 | template class B<int>; // expected-note {{requested here}} |
| 23 | template class B<char>; |
| 24 | |
| 25 | void test() |
| 26 | { |
| 27 | B<int> b; |
| 28 | b.z(3); |
| 29 | } |
| 30 | |
| 31 | |