brintos

brintos / llvm-project-archived public Read only

0
0
Text · 782 B · df09113 Raw
44 lines · plain
1// RUN: %clang_cc1  -fsyntax-only -Werror -verify -Wno-objc-root-class -Wno-strict-prototypes %s2// expected-no-diagnostics3 4@interface MyClass5- (void)someMethod;6@end7 8@implementation MyClass9- (void)someMethod {10    [self privateMethod];  // clang already does not warn here11}12 13int bar(MyClass * myObject) {14    [myObject privateMethod]; 15    return gorfbar(myObject);16}17- (void)privateMethod { }18 19int gorfbar(MyClass * myObject) {20    [myObject privateMethod]; 21    [myObject privateMethod1]; 22    return getMe + bar(myObject);23}24 25int KR(myObject)26MyClass * myObject;27{28    [myObject privateMethod];29    [myObject privateMethod1];30    return getMe + bar(myObject);31}32 33- (void)privateMethod1 {34  getMe = getMe+1;35}36 37static int getMe;38 39static int test(void) {40  return 0;41}42 43@end44