blob: 6239e948dce4f7817d7790f023cf3deb5585cbca [file] [log] [blame]
Patrick Beardb2f68202012-04-06 18:12:22 +00001// RUN: %clang_cc1 -fsyntax-only -verify -Wno-objc-root-class %s
Andy Gibbs8e8fb3b2012-10-19 12:44:48 +00002// expected-no-diagnostics
Steve Naroffe84a8642008-09-28 14:55:53 +00003
4@interface Foo
5@end
6@implementation Foo
7@end
8
9@implementation Foo(Whatever)
10+(float)returnsFloat { return 7.0; }
11@end
12
13@interface Foo (MoreStuff)
14+(int)returnsInt;
15@end
16
17@implementation Foo (MoreStuff)
18+(int)returnsInt {
19 return 0;
20}
21
22+(void)returnsNothing {
23}
24-(int)callsReturnsInt {
25 float f = [Foo returnsFloat]; // GCC doesn't find this method (which is a bug IMHO).
26 [Foo returnsNothing];
27 return [Foo returnsInt];
28}
29@end
30
31int main() {return 0;}
32