// RUN: %clang_cc1 -no-opaque-pointers -triple x86_64-apple-macosx10.12.0 -emit-llvm -disable-llvm-passes -O3 -fblocks -fobjc-arc -fobjc-runtime-has-weak -std=c++11 -o - %s | FileCheck %s
void
// Check that the delegating block invoke function doesn't destruct the Weak
// object that is passed.
// CHECK-LABEL: define internal void @___Z8testWeakv_block_invoke(
// CHECK: call void @"_ZZ8testWeakvENK3$_2clE4Weak"(
// CHECK-NEXT: ret void
// CHECK-LABEL: define internal void @"_ZZ8testWeakvENK3$_2clE4Weak"(
// CHECK: call void @_ZN4WeakD1Ev(
// CHECK-NEXT: ret void
id test1_rv;
void
;
void