================
@@ -1317,9 +1323,15 @@ inline bool CmpHelperEQ<Pointer>(InterpState &S, CodePtr
OpPC, CompareFn Fn) {
return true;
}
+ if (arePotentiallyOverlappingInitListBackingArrays(S, LHS, RHS)) {
+ const SourceInfo &Loc = S.Current->getSource(OpPC);
+ S.FFDiag(Loc, diag::note_constexpr_non_unique_object_comparison);
+ return false;
+ }
+
// Otherwise we need to do a bunch of extra checks before returning
Unordered.
- if (LHS.isOnePastEnd() && !RHS.isOnePastEnd() && RHS.isBlockPointer() &&
- RHS.getOffset() == 0) {
+ if (LHS.isOnePastEnd() && !RHS.isOnePastEnd() && !RHS.isZero() &&
----------------
tbaederr wrote:
There's an `assert(!RHS.isZero())` above.
https://github.com/llvm/llvm-project/pull/197458
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits