blob: de90a1eccbaaea196a004d45df9534a0fe109822 [file] [log] [blame]
Fariborz Jahanian1dad5b22008-01-25 17:43:39 +00001// RUN: clang -fsyntax-only -verify %s
2
3@interface I
4- (id) retain;
5@end
6
7void __raiseExc1() {
Chris Lattner4018a282009-03-11 03:47:47 +00008 [objc_lookUpClass("NSString") retain]; // expected-warning {{receiver type 'int' is not 'id'}} \
Chris Lattner0c73f372009-03-09 21:19:16 +00009 expected-warning {{method '-retain' not found}}
Steve Naroff8e2945a2009-03-01 17:14:31 +000010}
11
12typedef const struct __CFString * CFStringRef;
13
14void func() {
15 CFStringRef obj;
16
Chris Lattner4018a282009-03-11 03:47:47 +000017 [obj self]; // expected-warning {{receiver type 'CFStringRef' (aka 'struct __CFString const *') is not 'id'}} \\
Chris Lattner0c73f372009-03-09 21:19:16 +000018 expected-warning {{method '-self' not found}}
Fariborz Jahanian1dad5b22008-01-25 17:43:39 +000019}