void CastOperation::CheckBuiltinBitCast() {
QualType SrcType = SrcExpr.get()->getType();
- if (SrcExpr.get()->isRValue())
- SrcExpr = Self.CreateMaterializeTemporaryExpr(SrcType, SrcExpr.get(),
- /*IsLValueReference=*/false);
if (Self.RequireCompleteType(OpRange.getBegin(), DestType,
diag::err_typecheck_cast_to_incomplete) ||
return;
}
+ if (SrcExpr.get()->isRValue())
+ SrcExpr = Self.CreateMaterializeTemporaryExpr(SrcType, SrcExpr.get(),
+ /*IsLValueReference=*/false);
+
CharUnits DestSize = Self.Context.getTypeSizeInChars(DestType);
CharUnits SourceSize = Self.Context.getTypeSizeInChars(SrcType);
if (DestSize != SourceSize) {