xref: /minix3/external/bsd/llvm/dist/clang/test/SemaObjC/method-not-defined.m (revision f4a2713ac843a11c696ec80c0a5e3e5d80b4d338)
1*f4a2713aSLionel Sambuc// RUN: %clang_cc1 -fsyntax-only -verify %s
2*f4a2713aSLionel Sambuc
3*f4a2713aSLionel Sambuc@interface Foo // expected-note {{receiver is instance of class declared here}}
4*f4a2713aSLionel Sambuc@end
5*f4a2713aSLionel Sambuc
6*f4a2713aSLionel Sambucvoid test() {
7*f4a2713aSLionel Sambuc  Foo *fooObj;
8*f4a2713aSLionel Sambuc  id obj;
9*f4a2713aSLionel Sambuc
10*f4a2713aSLionel Sambuc  [[Foo alloc] init]; // expected-warning {{class method '+alloc' not found (return type defaults to 'id')}} expected-warning {{instance method '-init' not found (return type defaults to 'id')}}
11*f4a2713aSLionel Sambuc  [fooObj notdefined]; // expected-warning {{instance method '-notdefined' not found (return type defaults to 'id')}}
12*f4a2713aSLionel Sambuc  [obj whatever:1 :2 :3]; // expected-warning {{instance method '-whatever:::' not found (return type defaults to 'id')}}
13*f4a2713aSLionel Sambuc}
14