1 | // Test this without pch. |
2 | // RUN: %clang_cc1 -include %s -fsyntax-only -verify %s |
3 | |
4 | // Test with pch. |
5 | // RUN: %clang_cc1 -emit-pch -o %t %s |
6 | // RUN: %clang_cc1 -include-pch %t -fsyntax-only -verify %s |
7 | |
8 | // expected-no-diagnostics |
9 | |
10 | #ifndef HEADER |
11 | #define HEADER |
12 | |
13 | // rdar://12627738 |
14 | namespace rdar12627738 { |
15 | |
16 | class RecyclerTag { |
17 | template <typename T> friend class Recycler; |
18 | }; |
19 | |
20 | } |
21 | |
22 | #else |
23 | |
24 | namespace rdar12627738 { |
25 | |
26 | template<typename TTag> |
27 | class CRN { |
28 | template <typename T> friend class Recycler; |
29 | }; |
30 | |
31 | |
32 | template<typename T> |
33 | class Recycler { |
34 | public: |
35 | Recycler (); |
36 | }; |
37 | |
38 | |
39 | template<typename T> |
40 | Recycler<T>::Recycler () |
41 | { |
42 | } |
43 | |
44 | } |
45 | |
46 | #endif |
47 | |