brintos

brintos / llvm-project-archived public Read only

0
0
Text · 505 B · 8ccf61f Raw
21 lines · plain
1// RUN: %clang_cc1 -fsyntax-only -verify %s2 3@interface I4- (id) retain;5@end6 7int objc_lookUpClass(const char*);8 9void __raiseExc1(void) {10 [objc_lookUpClass("NSString") retain]; // expected-warning {{receiver type 'int' is not 'id'}}11}12 13typedef const struct __CFString * CFStringRef;14 15void func(void) {16  CFStringRef obj;17 18  [obj self]; // expected-warning {{receiver type 'CFStringRef' (aka 'const struct __CFString *') is not 'id'}} \\19                 expected-warning {{method '-self' not found}}20}21