xref: /llvm-project/clang/test/SemaObjC/delay-parsing-cfunctions.m (revision 8be1ecd61558d22d8d17a5c0b1a8e45170bf7789)
1// RUN: %clang_cc1  -fsyntax-only -Werror -verify -Wno-objc-root-class %s
2// RUN: %clang_cc1 -x objective-c++ -fsyntax-only -Werror -verify -Wno-objc-root-class %s
3// rdar://10387088
4
5@interface MyClass
6- (void)someMethod;
7@end
8
9@implementation MyClass
10- (void)someMethod {
11    [self privateMethod];  // clang already does not warn here
12}
13
14int bar(MyClass * myObject) {
15    [myObject privateMethod];
16    return gorfbar(myObject);
17}
18- (void)privateMethod { }
19
20int gorfbar(MyClass * myObject) {
21    [myObject privateMethod];
22    [myObject privateMethod1];
23    return getMe + bar(myObject);
24}
25
26- (void)privateMethod1 {
27  getMe = getMe+1;
28}
29
30static int getMe;
31
32static int test() {
33  return 0;
34}
35
36@end
37