1 // RUN: %clang_cc1 -triple x86_64-apple-macos11 -fsyntax-only -fobjc-arc -fblocks -verify -Wunused-but-set-variable -Wno-objc-root-class %s
3 typedef struct dispatch_queue_s *dispatch_queue_t;
5 typedef void (^dispatch_block_t)(void);
7 void dispatch_async(dispatch_queue_t queue, dispatch_block_t block);
9 extern __attribute__((visibility("default"))) struct dispatch_queue_s _dispatch_main_q;
23 __block id x = getFoo();
25 __block I *z = (I *)x;
26 // diagnose non-block variables
27 id x2 = getFoo(); // expected-warning {{variable 'x2' set but not used}}
28 dispatch_async(&_dispatch_main_q, ^{