brintos

brintos / llvm-project-archived public Read only

0
0
Text · 553 B · 3435ed5 Raw
33 lines · plain
1// RUN: %clang_cc1 -fsyntax-only -verify -Wno-objc-root-class %s2// expected-no-diagnostics3 4@interface Foo5@end6@implementation Foo7@end8 9@implementation Foo(Whatever)10+(float)returnsFloat { return 7.0; }11@end12 13@interface Foo (MoreStuff)14+(int)returnsInt;15@end16 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@end30 31int main(void) {return 0;}32 33