Do not warn with -Wuninitialized when the member is used in a sizeof or address-of...
[clang.git] / test / Rewriter / blockcast3.mm
blob97f417cec9ef9d6c553439e22a2d965f410b754c
1 // RUN: %clang_cc1 -x objective-c++ -fblocks -fms-extensions -rewrite-objc %s -o %t-rw.cpp
2 // RUN: FileCheck -check-prefix LP --input-file=%t-rw.cpp %s
3 // radar 7607781
5 typedef struct {
6         int a;
7         int b;
8 } mystruct;
9         
10 void g(int (^block)(mystruct s)) {
11         mystruct x;
12         int v = block(x);
15 void f(const void **arg) {
16         __block const void **q = arg;
17         g(^(mystruct s){
18                 *q++ = (void*)s.a;
19                 return 314;
20                 });
23 // CHECK-LP: (struct __Block_byref_q_0 *)&q