2022-02-24 15:30:30 -05:00
|
|
|
// RUN: %clang_cc1 -fsyntax-only -Werror -verify -Wno-objc-root-class -Wno-strict-prototypes %s
|
2012-10-19 12:44:48 +00:00
|
|
|
// expected-no-diagnostics
|
2023-07-17 12:47:39 -07:00
|
|
|
// rdar://10387088
|
2012-07-02 23:37:09 +00:00
|
|
|
|
|
|
|
@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-10 22:01:36 +00:00
|
|
|
int KR(myObject)
|
|
|
|
MyClass * myObject;
|
|
|
|
{
|
|
|
|
[myObject privateMethod];
|
|
|
|
[myObject privateMethod1];
|
|
|
|
return getMe + bar(myObject);
|
|
|
|
}
|
|
|
|
|
2012-07-02 23:37:09 +00:00
|
|
|
- (void)privateMethod1 {
|
|
|
|
getMe = getMe+1;
|
|
|
|
}
|
|
|
|
|
|
|
|
static int getMe;
|
|
|
|
|
2022-02-07 15:28:35 -05:00
|
|
|
static int test(void) {
|
2012-07-03 22:54:28 +00:00
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2012-07-02 23:37:09 +00:00
|
|
|
@end
|