Debian Codegraph @

clang/test/SemaObjC/delay-parsing-cfunctions.m

raw
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
13 int bar(MyClass * myObject) {
14 [myObject privateMethod];
15 return gorfbar(myObject);
16 }
17 - (void)privateMethod { }
18
19 int gorfbar(MyClass * myObject) {
20 [myObject privateMethod];
21 [myObject privateMethod1];
22 return getMe + bar(myObject);
23 }
24
25 int KR(myObject)
26 MyClass * myObject;
27 {
28 [myObject privateMethod];
29 [myObject privateMethod1];
30 return getMe + bar(myObject);
31 }
32
33 - (void)privateMethod1 {
34 getMe = getMe+1;
35 }
36
37 static int getMe;
38
39 static int test(void) {
40 return 0;
41 }
42
43 @end