Do not warn with -Wuninitialized when the member is used in a sizeof or address-of...
[clang.git] / test / SemaObjC / property-11.m
blob297611574eae7aba18d9d646278a8083d26398c9
1 // RUN: %clang_cc1 -fsyntax-only -verify %s
3 @interface NSSound
4 @end
5 @interface NSFont
6 @end
8 @interface NSSound (Adds)
9 @end
11 @implementation NSSound (Adds)
12 - foo {
13   return self;
15 - (void)setFoo:obj {
17 @end
19 @implementation NSFont (Adds)
21 - xx {
22   NSSound *x;
23   id o;
25   // GCC does *not* warn about the following. Since foo/setFoo: are not in the
26   // class or category interface for NSSound, the compiler shouldn't find them.
27   // For now, we will support GCC's behavior (sigh).
28   o = [x foo];
29   o = x.foo;
30   [x setFoo:o];
31   x.foo = o;
32   return 0;
35 @end