xref: /llvm-project/clang/test/SemaObjC/NSString-type.m (revision 0f1c1be1968076d6f96f8a7bcc4a15cf195ecd97)
1// RUN: %clang_cc1  -triple x86_64-apple-darwin10 -fblocks -fsyntax-only -verify %s
2
3void test(id pid, Class pclass) {
4  void (^block)(void) = @"help"; // expected-error {{initializing 'void (^)(void)' with an expression of incompatible type 'NSString *'}}
5  void (^block1)(void) = pid;
6  void (^block2)(void) = @"help"; // expected-error {{initializing 'void (^)(void)' with an expression of incompatible type 'NSString *'}}
7  void (^block3)(void) = @"help"; // expected-error {{initializing 'void (^)(void)' with an expression of incompatible type 'NSString *'}}
8}
9
10