brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.2 KiB · 882a3e1 Raw
42 lines · plain
1// RUN: %clang_cc1 -fsyntax-only -verify %s2 3@interface Foo4- (void)foo:(Class)class; // expected-note{{passing argument to parameter 'class' here}}5@end6 7void FUNC(void) {8    Class c, c1;9    SEL s1, s2;10    id i, i1;11    Foo *f;12    [f foo:f];	// expected-error {{incompatible pointer types sending 'Foo *' to parameter of type 'Class'}}13    c = f;	// expected-error {{incompatible pointer types assigning to 'Class' from 'Foo *'}}14 15    c = i;16 17    i = c;18 19    c = c1;20 21    i = i1;22 23    s1 = i;	// expected-error {{incompatible pointer types assigning to 'SEL' from 'id'}}24    i = s1;	// expected-error {{incompatible pointer types assigning to 'id' from 'SEL'}}25 26    s1 = s2;27 28    s1 = c;	// expected-error {{incompatible pointer types assigning to 'SEL' from 'Class'}}29 30    c = s1;	// expected-error {{incompatible pointer types assigning to 'Class' from 'SEL'}}31 32    f = i;33 34    f = c;	// expected-error {{incompatible pointer types assigning to 'Foo *' from 'Class'}}35 36    f = s1;	// expected-error {{incompatible pointer types assigning to 'Foo *' from 'SEL'}}37 38    i = f;39 40    s1 = f; 	// expected-error {{incompatible pointer types assigning to 'SEL' from 'Foo *'}}41}42