xref: /aosp_15_r20/external/clang/test/SemaObjC/block-on-method-param.m (revision 67e74705e28f6214e480b399dd47ea732279e315)
1*67e74705SXin Li// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -fsyntax-only -verify -fblocks -Wno-objc-root-class %s
2*67e74705SXin Li// RUN: %clang_cc1 -x objective-c++ -triple x86_64-apple-darwin10 -fsyntax-only -verify -fblocks -Wno-objc-root-class %s
3*67e74705SXin Li
4*67e74705SXin Li// rdar://10681443
5*67e74705SXin Li@interface I
6*67e74705SXin Li- (void) compileSandboxProfileAndReturnError:(__attribute__((__blocks__(byref))) id)errorp; // expected-error {{__block attribute not allowed, only allowed on local variables}}
7*67e74705SXin Li@end
8*67e74705SXin Li
9*67e74705SXin Li@implementation I
10*67e74705SXin Li- (void) compileSandboxProfileAndReturnError:(__attribute__((__blocks__(byref))) id)errorp {} // expected-error {{__block attribute not allowed, only allowed on local variables}}
11*67e74705SXin Li@end
12*67e74705SXin Li
13