brintos

brintos / llvm-project-archived public Read only

0
0
Text · 680 B · 54ec0f5 Raw
26 lines · plain
1// RUN: %clang_cc1 -E %s -o %t.mm2// RUN: %clang_cc1 -x objective-c++ -fblocks -fms-extensions -rewrite-objc -fobjc-runtime=macosx-fragile-10.5 %t.mm -o %t-rw.cpp3// RUN: FileCheck -check-prefix CHECK-LP --input-file=%t-rw.cpp %s4// RUN: %clang_cc1 -x objective-c++ -fblocks -fms-extensions -rewrite-objc %t.mm -o %t-modern-rw.cpp5// RUN: FileCheck -check-prefix CHECK-LP --input-file=%t-modern-rw.cpp %s6 7typedef struct {8	int a;9	int b;10} mystruct;11	12void g(int (^block)(mystruct s)) {13	mystruct x;14	int v = block(x);15}16 17void f(const void **arg) {18	__block const void **q = arg;19	g(^(mystruct s){20		*q++ = (void*)s.a;21		return 314;22		});23}24 25// CHECK-LP: (__Block_byref_q_0 *)&q26