blob: 81734fdda498d3cee292bbb7e89a58891d563764 [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
3// 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
26- (void)privateMethod1 {
27 getMe = getMe+1;
28}
29
30static int getMe;
31
Fariborz Jahanian3b5f9dc2012-07-03 22:54:28 +000032static int test() {
33 return 0;
34}
35
Fariborz Jahanian6c89eaf2012-07-02 23:37:09 +000036@end