| 1 | // RUN: %clang_cc1 -fsyntax-only -verify -pedantic %s |
|---|---|
| 2 | |
| 3 | @interface Derived |
| 4 | @end |
| 5 | |
| 6 | @interface Object @end |
| 7 | |
| 8 | extern Object* foo(void); |
| 9 | |
| 10 | static Derived *test(void) |
| 11 | { |
| 12 | Derived *m = foo(); // expected-warning {{incompatible pointer types initializing 'Derived *' with an expression of type 'Object *'}} |
| 13 | |
| 14 | return m; |
| 15 | } |
| 16 | |
| 17 |