Douglas Gregor | a29a3ff | 2009-09-28 00:08:27 +0000 | [diff] [blame^] | 1 | // RUN: clang-cc -fsyntax-only -verify %s |
Douglas Gregor | 3dad842 | 2009-09-26 06:47:28 +0000 | [diff] [blame] | 2 | |
| 3 | // PR5057 |
| 4 | namespace std { |
| 5 | class X { |
| 6 | public: |
| 7 | template<typename T> |
| 8 | friend struct Y; |
| 9 | }; |
| 10 | } |
| 11 | |
| 12 | namespace std { |
| 13 | template<typename T> |
| 14 | struct Y |
| 15 | { |
| 16 | }; |
| 17 | } |
Douglas Gregor | a29a3ff | 2009-09-28 00:08:27 +0000 | [diff] [blame^] | 18 | |
| 19 | |
| 20 | namespace N { |
| 21 | template<typename T> void f1(T) { } // expected-note{{here}} |
| 22 | |
| 23 | class X { |
| 24 | template<typename T> friend void f0(T); |
| 25 | template<typename T> friend void f1(T); |
| 26 | }; |
| 27 | |
| 28 | template<typename T> void f0(T) { } |
| 29 | template<typename T> void f1(T) { } // expected-error{{redefinition}} |
| 30 | } |