https://github.com/falbrechtskirchinger created https://github.com/llvm/llvm-project/pull/113137
Add a test case for the assertion error encountered in #99036 and #109354. The issue was incidentally fixed by #111179. >From a19b65b8512b103afae697cadf1ccd7cce4ef940 Mon Sep 17 00:00:00 2001 From: Florian Albrechtskirchinger <falbrechtskirchin...@gmail.com> Date: Mon, 21 Oct 2024 11:18:29 +0200 Subject: [PATCH] [Concepts] Add regression test for #99036 Add a test case for the assertion error encountered in #99036 and #109354. The issue was incidentally fixed by #111179. --- clang/test/PCH/cxx2a-constraints-crash.cpp | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/clang/test/PCH/cxx2a-constraints-crash.cpp b/clang/test/PCH/cxx2a-constraints-crash.cpp index 637c55f0c879c9..5c54ba4c425465 100644 --- a/clang/test/PCH/cxx2a-constraints-crash.cpp +++ b/clang/test/PCH/cxx2a-constraints-crash.cpp @@ -1,7 +1,5 @@ -// RUN: %clang_cc1 -std=c++2a -emit-pch %s -o %t -// RUN: %clang_cc1 -std=c++2a -include-pch %t -verify %s - -// expected-no-diagnostics +// RUN: %clang_cc1 -std=c++2a -fallow-pch-with-compiler-errors -emit-pch -o %t %s -verify +// RUN: %clang_cc1 -std=c++2a -fallow-pch-with-compiler-errors -include-pch %t %s -verify #ifndef HEADER #define HEADER @@ -27,3 +25,12 @@ int main() { } #endif + +namespace GH99036 { + +template <typename T> +concept C; // expected-error {{expected '='}} + +template <C U> void f(); + +} // namespace GH99036 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits