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 // rdar://12627738 17 namespace rdar12627738 { 18 19 class RecyclerTag { 20 template <typename T> friend class Recycler; 21 }; 22 23 } 24 25 #else 26 27 namespace rdar12627738 { 28 29 template<typename TTag> 30 class CRN { 31 template <typename T> friend class Recycler; 32 }; 33 34 35 template<typename T> 36 class Recycler { 37 public: 38 Recycler (); 39 }; 40 41 42 template<typename T> Recycler()43Recycler<T>::Recycler () 44 { 45 } 46 47 } 48 49 #endif 50