blob: c74b054f74d4a8300f68d48d4c374e997e87520f [file] [log] [blame]
Fariborz Jahanian6c89eaf2012-07-02 23:37:09 +00001// RUN: %clang_cc1 -fsyntax-only -Werror -verify -Wno-objc-root-class %s
Andy Gibbs8e8fb3b2012-10-19 12:44:48 +00002// expected-no-diagnostics
Fariborz Jahanian6c89eaf2012-07-02 23:37:09 +00003// rdar://10387088
4
5@interface MyClass
6- (void)someMethod;
7@end
8
9@implementation MyClass
10- (void)someMethod {
11 [self privateMethod]; // clang already does not warn here
12}
13
14int bar(MyClass * myObject) {
15 [myObject privateMethod];
16 return gorfbar(myObject);
17}
18- (void)privateMethod { }
19
20int gorfbar(MyClass * myObject) {
21 [myObject privateMethod];
22 [myObject privateMethod1];
23 return getMe + bar(myObject);
24}
25
Fariborz Jahanian1afc5f22012-08-10 22:01:36 +000026int KR(myObject)
27MyClass * myObject;
28{
29 [myObject privateMethod];
30 [myObject privateMethod1];
31 return getMe + bar(myObject);
32}
33
Fariborz Jahanian6c89eaf2012-07-02 23:37:09 +000034- (void)privateMethod1 {
35 getMe = getMe+1;
36}
37
38static int getMe;
39
Fariborz Jahanian3b5f9dc2012-07-03 22:54:28 +000040static int test() {
41 return 0;
42}
43
Fariborz Jahanian6c89eaf2012-07-02 23:37:09 +000044@end