1 // RUN: %clang_cc1 -x objective-c++ -fsyntax-only -Werror -verify -Wno-objc-root-class %s
2 // expected-no-diagnostics
9 int bar(MyClass * myObject);
11 int gorfbar(MyClass * myObject);
14 S(MyClass *O1, MyClass *O2);
17 MyClass * Obj1, *Obj2;
21 @implementation MyClass
23 [self privateMethod]; // clang already does not warn here
26 int S::bar(MyClass * myObject) {
27 [myObject privateMethod];
28 return gorfbar(myObject);
30 - (void)privateMethod { }
32 int S::gorfbar(MyClass * myObject) {
33 [myObject privateMethod];
34 [myObject privateMethod1];
35 return getMe + bar(myObject);
38 S::S(MyClass *O1, MyClass *O2) : Obj1(O1), Obj2(O2) {
42 S::S(MyClass *O1) : Obj1(O1){ Obj2 = 0; }
46 - (void)privateMethod1 {