blob: 840923ad6f7b1e9642d0b365fdeb4f8295027465 [file] [log] [blame]
Fariborz Jahanian6c89eaf2012-07-02 23:37:09 +00001// RUN: %clang_cc1 -fsyntax-only -Werror -verify -Wno-objc-root-class %s
2// RUN: %clang_cc1 -x objective-c++ -fsyntax-only -Werror -verify -Wno-objc-root-class %s
Fariborz Jahanian3b5f9dc2012-07-03 22:54:28 +00003// RUN: %clang_cc1 -x objective-c++ -std=c++11 -fsyntax-only -Werror -verify -Wno-objc-root-class %s
Fariborz Jahanian6c89eaf2012-07-02 23:37:09 +00004// rdar://10387088
5
6@interface MyClass
7- (void)someMethod;
8@end
9
10@implementation MyClass
11- (void)someMethod {
12 [self privateMethod]; // clang already does not warn here
13}
14
15int bar(MyClass * myObject) {
16 [myObject privateMethod];
17 return gorfbar(myObject);
18}
19- (void)privateMethod { }
20
21int gorfbar(MyClass * myObject) {
22 [myObject privateMethod];
23 [myObject privateMethod1];
24 return getMe + bar(myObject);
25}
26
27- (void)privateMethod1 {
28 getMe = getMe+1;
29}
30
31static int getMe;
32
Fariborz Jahanian3b5f9dc2012-07-03 22:54:28 +000033static int test() {
34 return 0;
35}
36
Fariborz Jahanian6c89eaf2012-07-02 23:37:09 +000037@end