1// RUN: %clang_cc1 -x objective-c++ -fblocks -triple x86_64-apple-darwin10 -fobjc-runtime=macosx-fragile-10.5 -std=c++1z -emit-llvm -o - %s | FileCheck %s 2 3// rdar://31385153 4// Shouldn't crash! 5 6void takesBlock(void (^)(void)); 7 8struct Copyable { 9 Copyable(const Copyable &x); 10}; 11 12void hasLambda(Copyable x) { 13 takesBlock([x] () { }); 14} 15// CHECK-LABEL: define internal void @__copy_helper_block_ 16// CHECK: call void @"_ZZ9hasLambda8CopyableEN3$_0C1ERKS0_" 17// CHECK-LABEL: define internal void @"_ZZ9hasLambda8CopyableEN3$_0C2ERKS0_" 18// CHECK: call void @_ZN8CopyableC1ERKS_ 19