blob: feae744f2af74b817a89d250fbfbff7340e37f87 [file] [log] [blame]
Fariborz Jahanian712bb812012-08-10 15:54:40 +00001// RUN: %clang_cc1 -x objective-c++ -fsyntax-only -Werror -verify -Wno-objc-root-class %s
2// rdar://10387088
3
4@interface MyClass
5- (void)someMethod;
6@end
7
8struct S {
9 int bar(MyClass * myObject);
10
11 int gorfbar(MyClass * myObject);
12
13};
14
15@implementation MyClass
16- (void)someMethod {
17 [self privateMethod]; // clang already does not warn here
18}
19
20int S::bar(MyClass * myObject) {
21 [myObject privateMethod];
22 return gorfbar(myObject);
23}
24- (void)privateMethod { }
25
26int S::gorfbar(MyClass * myObject) {
27 [myObject privateMethod];
28 [myObject privateMethod1];
29 return getMe + bar(myObject);
30}
31
32- (void)privateMethod1 {
33 getMe = getMe+1;
34}
35
36static int getMe;
37
38@end