[clang] [clang] Add regression test for GH205000 (PR #232754)
Muhammad Mahdi Amirpour via cfe-commits
cfe-commits at lists.llvm.org
Fri Oct 16 06:59:49 PDT 2026
https://github.com/m-amirpour created https://github.com/llvm/llvm-project/pull/232754
Fixes #205000.
The crash described in the issue was fixed by #223311. This adds the
reduced reproducer as a regression test in cxx2c-fold-exprs.cpp, which
is where similar fold-expression constraint tests live.
@shafik — tagging you since you asked for the regression test.
>From 973cdd2013fbaf30edf737052d6618757bbfda38 Mon Sep 17 00:00:00 2001
From: m-amirpour <ampr.mhd at gmail.com>
Date: Fri, 16 Oct 2026 17:09:03 +0330
Subject: [PATCH] [clang] Add regression test for GH205000
---
clang/test/SemaCXX/cxx2c-fold-exprs.cpp | 15 +++++++++++++++
1 file changed, 15 insertions(+)
diff --git a/clang/test/SemaCXX/cxx2c-fold-exprs.cpp b/clang/test/SemaCXX/cxx2c-fold-exprs.cpp
index f0819ed04881b3..0778ed7fe66372 100644
--- a/clang/test/SemaCXX/cxx2c-fold-exprs.cpp
+++ b/clang/test/SemaCXX/cxx2c-fold-exprs.cpp
@@ -752,3 +752,18 @@ static_assert(count == 2);
}
+namespace GH205000 {
+
+template <int N>
+struct StringLiteral {
+ constexpr StringLiteral(const auto... c)
+ requires (__is_same(decltype(c), const char) && ...) {}
+ constexpr StringLiteral(const char (&s)[N]) {}
+};
+
+template <StringLiteral... fields>
+struct Lit {};
+
+using Unit = Lit<"a">;
+
+}
More information about the cfe-commits
mailing list