[clang] 31dd03c - [Concepts] Add regression test for #99036 (#113137)
via cfe-commits
cfe-commits at lists.llvm.org
Mon Oct 21 16:43:04 PDT 2024
Author: Florian Albrechtskirchinger
Date: 2024-10-22T07:43:00+08:00
New Revision: 31dd03cb3ee73e20b8220c2bf991c1afcba923c5
URL: https://github.com/llvm/llvm-project/commit/31dd03cb3ee73e20b8220c2bf991c1afcba923c5
DIFF: https://github.com/llvm/llvm-project/commit/31dd03cb3ee73e20b8220c2bf991c1afcba923c5.diff
LOG: [Concepts] Add regression test for #99036 (#113137)
Added:
Modified:
clang/test/PCH/cxx2a-constraints-crash.cpp
Removed:
################################################################################
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
More information about the cfe-commits
mailing list