[clang] [Concepts] Add regression test for #99036 (PR #113137)
via cfe-commits
cfe-commits at lists.llvm.org
Mon Oct 21 02:33:34 PDT 2024
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-clang
Author: Florian Albrechtskirchinger (falbrechtskirchinger)
<details>
<summary>Changes</summary>
Add a test case for the assertion error encountered in #<!-- -->99036 and #<!-- -->109354. The issue was incidentally fixed by #<!-- -->111179.
---
Full diff: https://github.com/llvm/llvm-project/pull/113137.diff
1 Files Affected:
- (modified) clang/test/PCH/cxx2a-constraints-crash.cpp (+11-4)
``````````diff
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
``````````
</details>
https://github.com/llvm/llvm-project/pull/113137
More information about the cfe-commits
mailing list