[libc][test] Adjust header paths in tests (#119623)
[llvm-project.git] / clang / test / PCH / cxx-friends.cpp
blobd1610beccf5a2a056965e1553ab9e26beca73836
1 // Test this without pch.
2 // RUN: %clang_cc1 -include %S/cxx-friends.h -fsyntax-only -verify %s
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
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
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
16 // expected-no-diagnostics
18 class F {
19 void m() {
20 A* a;
21 a->x = 0;
25 template<typename T> class PR12585::future_base::setter {
26 public:
27 int f() {
28 return promise<T*>().k;
31 int k = PR12585::future_base::setter<int>().f();
33 Lazy::S *p;