[clang] [C++26] Implement P2752R3 'Static storage for braced initializers' (PR #197458)

Corentin Jabot via cfe-commits cfe-commits at lists.llvm.org
Thu May 21 05:40:50 PDT 2026


================
@@ -2067,31 +2074,32 @@ static bool GetLValueBaseAsString(const EvalInfo &Info, const LValue &LVal,
 // addresses onwards.
 //
 // See open core issue CWG2765 which is discussing the desired rule here.
-static bool ArePotentiallyOverlappingStringLiterals(const EvalInfo &Info,
-                                                    const LValue &LHS,
-                                                    const LValue &RHS) {
-  LValueBaseString LHSString, RHSString;
-  if (!GetLValueBaseAsString(Info, LHS, LHSString) ||
-      !GetLValueBaseAsString(Info, RHS, RHSString))
-    return false;
-
+//
+// Callers must ensure LHSString.CharWidth == RHSString.CharWidth — the byte
----------------
cor3ntin wrote:

Can you add an assert?

https://github.com/llvm/llvm-project/pull/197458


More information about the cfe-commits mailing list