summaryrefslogtreecommitdiffstats
path: root/test/SemaObjC/comptypes-6.m
blob: ad3da26185a75222eb3605d817fa035155936a6f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
// RUN: clang -cc1 -fsyntax-only -verify -pedantic %s

@interface Derived
@end

@interface Object @end

extern Object* foo(void);

static Derived *test(void)
{
   Derived *m = foo();   // expected-warning {{incompatible pointer types initializing 'Object *', expected 'Derived *'}}

   return m;
}