[Heikki Kultala] This patch contains the ABI changes for the TCE target.
[clang.git] / test / SemaObjC / warn-incompatible-builtin-types.m
blobfd4fb7d3a11d92dad55cf63b742e43c752c066c5
1 // RUN: %clang_cc1 -fsyntax-only -verify %s
2 // rdar://7634850
4 @interface Foo
5 - (void)foo:(Class)class; // expected-note{{passing argument to parameter 'class' here}}
6 @end
8 void FUNC() {
9     Class c, c1;
10     SEL s1, s2;
11     id i, i1;
12     Foo *f;
13     [f foo:f];  // expected-warning {{incompatible pointer types sending 'Foo *' to parameter of type 'Class'}}
14     c = f;      // expected-warning {{incompatible pointer types assigning to 'Class' from 'Foo *'}}
16     c = i;
18     i = c;
20     c = c1;
22     i = i1;
24     s1 = i;     // expected-warning {{incompatible pointer types assigning to 'SEL' from 'id'}}
25     i = s1;     // expected-warning {{incompatible pointer types assigning to 'id' from 'SEL'}}
27     s1 = s2;
29     s1 = c;     // expected-warning {{incompatible pointer types assigning to 'SEL' from 'Class'}}
31     c = s1;     // expected-warning {{incompatible pointer types assigning to 'Class' from 'SEL'}}
33     f = i;
35     f = c;      // expected-warning {{incompatible pointer types assigning to 'Foo *' from 'Class'}}
37     f = s1;     // expected-warning {{incompatible pointer types assigning to 'Foo *' from 'SEL'}}
39     i = f;
41     s1 = f;     // expected-warning {{incompatible pointer types assigning to 'SEL' from 'Foo *'}}