================
@@ -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
+// comparison below has no meaning across mismatched character widths.
+static bool ArePotentiallyOverlappingStrings(const LValueBaseString &LHSString,
----------------
yronglin wrote:
Done. The function name `ArePotentiallyOverlappingStringLiterals` is preserved.
The PR only introduces additional APValue overloads on top of the existing
name. We don't need renames of pre-existing APIs.
https://github.com/llvm/llvm-project/pull/197458
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits