[clang] [Clang][UBSan] Use EmitCheckedLValue for C++ trivial operator= operands (PR #203737)
Tony Varghese via cfe-commits
cfe-commits at lists.llvm.org
Thu Jun 18 05:50:56 PDT 2026
================
@@ -277,22 +277,27 @@ RValue CodeGenFunction::EmitCXXMemberOrOperatorMemberCallExpr(
}
}
- LValue This;
- if (IsArrow) {
- LValueBaseInfo BaseInfo;
- TBAAAccessInfo TBAAInfo;
- Address ThisValue = EmitPointerWithAlignment(Base, &BaseInfo, &TBAAInfo);
- This = MakeAddrLValue(ThisValue, Base->getType()->getPointeeType(),
- BaseInfo, TBAAInfo);
- } else {
- This = EmitLValue(Base);
- }
+ auto getLValueForThis = [this, IsArrow,
+ Base](bool EmitCheckedForStore = false) {
+ // FIXME: Respect EmitCheckedForStore for the IsArrow case.
----------------
tonykuttai wrote:
Maybe we can add a test to capture its current behaviour.
https://github.com/llvm/llvm-project/pull/203737
More information about the cfe-commits
mailing list