Do not warn with -Wuninitialized when the member is used in a sizeof or address-of...
[clang.git] / test / SemaObjC / category-method-lookup.m
blob27a10e556c28277d751d59de4cb40874225a125a
1 // RUN: %clang_cc1 -fsyntax-only -verify %s
3 @interface Foo
4 @end
5 @implementation Foo
6 @end
8 @implementation Foo(Whatever)
9 +(float)returnsFloat { return 7.0; }
10 @end
12 @interface Foo (MoreStuff)
13 +(int)returnsInt;
14 @end
16 @implementation Foo (MoreStuff)
17 +(int)returnsInt {
18   return 0;
21 +(void)returnsNothing {
23 -(int)callsReturnsInt {
24   float f = [Foo returnsFloat]; // GCC doesn't find this method (which is a bug IMHO).
25   [Foo returnsNothing];
26   return [Foo returnsInt];
28 @end
30 int main() {return 0;}