blob: e98c127c6e883775b0b4e75d66dc5baa41d962c5 [file] [log] [blame]
// RUN: %target-swift-frontend -Xllvm -sil-disable-pass=SILGenCleanup -primary-file %s -emit-ir -o - | %FileCheck %s
func f() -> Bool? { return nil }
({
guard var b = f() else { return }
let c = { b = true }
_ = (b, c)
})()
// CHECK-LABEL: @"$s9alloc_boxyyXEfU_"
// CHECK-NOT: call void @swift_setDeallocating
// CHECK: call void @swift_deallocUninitializedObject
// CHECK-NOT: call void @swift_setDeallocating
// CHECK: ret void