[libc] Switch to using the generic `<gpuintrin.h>` implementations (#121810)
[llvm-project.git] / clang / test / Interpreter / delayed-template-parsing-pch.cpp
blobf3bd4649ed0345a0e48c3b39aa369a9cea7eb01f
1 // Test the setup without incremental extensions first
2 // RUN: %clang_cc1 -std=c++17 -fdelayed-template-parsing -fpch-instantiate-templates %s -emit-pch -o %t.pch -verify
3 // RUN: %clang_cc1 -std=c++17 -fdelayed-template-parsing -include-pch %t.pch %s -verify
5 // RUN: %clang_cc1 -std=c++17 -fdelayed-template-parsing -fincremental-extensions -fpch-instantiate-templates %s -emit-pch -o %t.incremental.pch -verify
6 // RUN: %clang_cc1 -std=c++17 -fdelayed-template-parsing -fincremental-extensions -include-pch %t.incremental.pch %s -verify
8 // expected-no-diagnostics
10 #ifndef PCH
11 #define PCH
13 // Have one template that is instantiated in the PCH (via the passed option
14 // -fpch-instantiate-templates) and then serialized
15 template <typename T> T ft1() { return 0; }
16 inline int f1() { return ft1<int>(); }
18 // Have a second late-parsed template that needs to be deserialized
19 template <typename T> T ft2() { return 0; }
21 #else
23 int f2() { return ft2<int>(); }
25 #endif