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