[clang] Implement lifetime analysis for lifetime_capture_by(X) (#115921)
[llvm-project.git] / clang / test / PCH / cxx2a-constraints-crash.cpp
blob5c54ba4c42546576fb1c0d9cb6eb82baab74de83
1 // RUN: %clang_cc1 -std=c++2a -fallow-pch-with-compiler-errors -emit-pch -o %t %s -verify
2 // RUN: %clang_cc1 -std=c++2a -fallow-pch-with-compiler-errors -include-pch %t %s -verify
4 #ifndef HEADER
5 #define HEADER
7 template <typename T, typename U>
8 concept not_same_as = true;
10 template <int Kind>
11 struct subrange {
12 template <not_same_as<int> R>
13 subrange(R) requires(Kind == 0);
15 template <not_same_as<int> R>
16 subrange(R) requires(Kind != 0);
19 template <typename R>
20 subrange(R) -> subrange<42>;
22 int main() {
23 int c;
24 subrange s(c);
27 #endif
29 namespace GH99036 {
31 template <typename T>
32 concept C; // expected-error {{expected '='}}
34 template <C U> void f();
36 } // namespace GH99036