blob: 98cf488792123e579ef665d48c98a25ae71a9a17 [file] [log] [blame]
Daniel Dunbara5728872009-12-15 20:14:24 +00001// RUN: %clang_cc1 -fsyntax-only -verify -pedantic %s
Fariborz Jahanian7b5e1b82007-12-21 23:48:59 +00002
Fariborz Jahanian38860122008-01-09 00:33:05 +00003@interface Derived
Fariborz Jahanian7b5e1b82007-12-21 23:48:59 +00004@end
5
Fariborz Jahanian38860122008-01-09 00:33:05 +00006@interface Object @end
7
Fariborz Jahanian7b5e1b82007-12-21 23:48:59 +00008extern Object* foo(void);
9
10static Derived *test(void)
11{
Douglas Gregor08a41902010-04-09 17:53:29 +000012 Derived *m = foo(); // expected-warning {{incompatible pointer types initializing 'Derived *' with an expression of type 'Object *'}}
Fariborz Jahanian7b5e1b82007-12-21 23:48:59 +000013
14 return m;
15}
16