Do not warn with -Wuninitialized when the member is used in a sizeof or address-of...
[clang.git] / test / SemaObjC / bad-receiver-1.m
blobfe3eecff2bcf348409d3b051d224b194364d8fc3
1 // RUN: %clang_cc1 -fsyntax-only -verify %s
3 @interface I
4 - (id) retain;
5 @end
7 int objc_lookUpClass(const char*);
9 void __raiseExc1() {
10  [objc_lookUpClass("NSString") retain]; // expected-warning {{receiver type 'int' is not 'id'}} \
11     expected-warning {{method '-retain' not found}}
14 typedef const struct __CFString * CFStringRef;
16 void func() {
17   CFStringRef obj;
19   [obj self]; // expected-warning {{receiver type 'CFStringRef' (aka 'const struct __CFString *') is not 'id'}} \\
20                  expected-warning {{method '-self' not found}}