SetFailed(InitializationSequence::FK_ConversionFailed);
} else {
AddConversionSequenceStep(ICS, Entity.getType());
+
+ MaybeProduceObjCObject(S, *this, Entity);
}
}
// overlap restriction of subclause 6.5.16.1 does not apply to the case of
// function return.
- // In C++ the return statement is handled via a copy initialization.
+ // In C++ the return statement is handled via a copy initialization,
// the C version of which boils down to CheckSingleAssignmentConstraints.
NRVOCandidate = getCopyElisionCandidate(FnRetType, RetValExp, false);
InitializedEntity Entity = InitializedEntity::InitializeResult(ReturnLoc,
// CHECK: call void @objc_release
// CHECK-NEXT: ret void
}
+
+// rdar://problem/9603128
+// CHECK: define i8* @_Z6test36P11objc_object(
+id test36(id z) {
+ // CHECK: objc_retain
+ // CHECK: objc_retain
+ // CHECK: objc_release
+ // CHECK: objc_autoreleaseReturnValue
+ return z;
+}