Skip to content

Commit 31dd03c

Browse files
[Concepts] Add regression test for #99036 (#113137)
1 parent c3fe0e4 commit 31dd03c

File tree

1 file changed

+11
-4
lines changed

1 file changed

+11
-4
lines changed

clang/test/PCH/cxx2a-constraints-crash.cpp

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
1-
// RUN: %clang_cc1 -std=c++2a -emit-pch %s -o %t
2-
// RUN: %clang_cc1 -std=c++2a -include-pch %t -verify %s
3-
4-
// expected-no-diagnostics
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
53

64
#ifndef HEADER
75
#define HEADER
@@ -27,3 +25,12 @@ int main() {
2725
}
2826

2927
#endif
28+
29+
namespace GH99036 {
30+
31+
template <typename T>
32+
concept C; // expected-error {{expected '='}}
33+
34+
template <C U> void f();
35+
36+
} // namespace GH99036

0 commit comments

Comments
 (0)