2012-07-03 07:37:09 +08:00
|
|
|
// RUN: %clang_cc1 -fsyntax-only -Werror -verify -Wno-objc-root-class %s
|
2012-10-19 20:44:48 +08:00
|
|
|
// expected-no-diagnostics
|
2012-07-03 07:37:09 +08:00
|
|
|
// rdar://10387088
|
|
|
|
|
|
|
|
@interface MyClass
|
|
|
|
- (void)someMethod;
|
|
|
|
@end
|
|
|
|
|
|
|
|
@implementation MyClass
|
|
|
|
- (void)someMethod {
|
|
|
|
[self privateMethod]; // clang already does not warn here
|
|
|
|
}
|
|
|
|
|
|
|
|
int bar(MyClass * myObject) {
|
|
|
|
[myObject privateMethod];
|
|
|
|
return gorfbar(myObject);
|
|
|
|
}
|
|
|
|
- (void)privateMethod { }
|
|
|
|
|
|
|
|
int gorfbar(MyClass * myObject) {
|
|
|
|
[myObject privateMethod];
|
|
|
|
[myObject privateMethod1];
|
|
|
|
return getMe + bar(myObject);
|
|
|
|
}
|
|
|
|
|
2012-08-11 06:01:36 +08:00
|
|
|
int KR(myObject)
|
|
|
|
MyClass * myObject;
|
|
|
|
{
|
|
|
|
[myObject privateMethod];
|
|
|
|
[myObject privateMethod1];
|
|
|
|
return getMe + bar(myObject);
|
|
|
|
}
|
|
|
|
|
2012-07-03 07:37:09 +08:00
|
|
|
- (void)privateMethod1 {
|
|
|
|
getMe = getMe+1;
|
|
|
|
}
|
|
|
|
|
|
|
|
static int getMe;
|
|
|
|
|
2012-07-04 06:54:28 +08:00
|
|
|
static int test() {
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2012-07-03 07:37:09 +08:00
|
|
|
@end
|