mirror of
https://github.com/llvm/llvm-project.git
synced 2025-04-25 05:16:08 +00:00

This reverts commit d618f1c3b12effd0c2bdb7d02108d3551f389d3d. This commit wasn't reviewed ahead of time and significant concerns were raised immediately after it landed. According to our developer policy this warrants immediate revert of the commit. https://llvm.org/docs/DeveloperPolicy.html#patch-reversion-policy Differential Revision: https://reviews.llvm.org/D155509
45 lines
801 B
Objective-C
45 lines
801 B
Objective-C
// RUN: %clang_cc1 -fsyntax-only -Werror -verify -Wno-objc-root-class -Wno-strict-prototypes %s
|
|
// expected-no-diagnostics
|
|
// 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);
|
|
}
|
|
|
|
int KR(myObject)
|
|
MyClass * myObject;
|
|
{
|
|
[myObject privateMethod];
|
|
[myObject privateMethod1];
|
|
return getMe + bar(myObject);
|
|
}
|
|
|
|
- (void)privateMethod1 {
|
|
getMe = getMe+1;
|
|
}
|
|
|
|
static int getMe;
|
|
|
|
static int test(void) {
|
|
return 0;
|
|
}
|
|
|
|
@end
|