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