[clang] [CIR] Handle CK_UserDefinedConversion and related casts in emitCastLValue (PR #193611)
via cfe-commits
cfe-commits at lists.llvm.org
Thu Apr 23 10:53:20 PDT 2026
================
@@ -1508,15 +1508,17 @@ LValue CIRGenFunction::emitCastLValue(const CastExpr *e) {
case CK_ToUnion:
return emitAggExprToLValue(e);
- case CK_NonAtomicToAtomic:
- case CK_AtomicToNonAtomic:
- case CK_ObjCObjectLValueCast:
- case CK_VectorSplat:
case CK_ConstructorConversion:
case CK_UserDefinedConversion:
case CK_CPointerToObjCPointerCast:
case CK_BlockPointerToObjCPointerCast:
- case CK_LValueToRValue: {
+ case CK_LValueToRValue:
----------------
adams381 wrote:
The remaining cases (`CK_CPointerToObjCPointerCast`, `CK_BlockPointerToObjCPointerCast`, `CK_LValueToRValue`) are ObjC-specific or unlikely to hit the lvalue path in practice. I've added coverage for the two that are exercisable in standard C++ (`CK_ConstructorConversion` and `CK_UserDefinedConversion`).
https://github.com/llvm/llvm-project/pull/193611
More information about the cfe-commits
mailing list