| 1 |
// Test this without pch. |
| 2 |
// RUN: %clang_cc1 -include %S/cxx-friends.h -fsyntax-only -verify %s |
| 3 |
|
| 4 |
// Test with pch. |
| 5 |
// RUN: %clang_cc1 -x c++-header -emit-pch -o %t %S/cxx-friends.h |
| 6 |
// RUN: %clang_cc1 -include-pch %t -fsyntax-only -verify %s -error-on-deserialized-decl doNotDeserialize |
| 7 |
|
| 8 |
// Test with pch and template instantiation in the pch. |
| 9 |
// RUN: %clang_cc1 -x c++-header -emit-pch -fpch-instantiate-templates -o %t %S/cxx-friends.h |
| 10 |
// RUN: %clang_cc1 -include-pch %t -fsyntax-only -verify %s -error-on-deserialized-decl doNotDeserialize |
| 11 |
|
| 12 |
// Test with modules. |
| 13 |
// RUN: %clang_cc1 -x c++-header -emit-pch -o %t %S/cxx-friends.h -fmodules |
| 14 |
// RUN: %clang_cc1 -include-pch %t -fsyntax-only -verify %s -error-on-deserialized-decl doNotDeserialize -fmodules |
| 15 |
|
| 16 |
// expected-no-diagnostics |
| 17 |
|
| 18 |
class F { |
| 19 |
void m() { |
| 20 |
A* a; |
| 21 |
a->x = 0; |
| 22 |
} |
| 23 |
}; |
| 24 |
|
| 25 |
template<typename T> class PR12585::future_base::setter { |
| 26 |
public: |
| 27 |
int f() { |
| 28 |
return promise<T*>().k; |
| 29 |
} |
| 30 |
}; |
| 31 |
int k = PR12585::future_base::setter<int>().f(); |
| 32 |
|
| 33 |
Lazy::S *p; |