Debian Codegraph @

clang/test/SemaObjCXX/delay-parsing-cfunctions.mm

raw
1 // RUN: %clang_cc1 -x objective-c++ -std=c++11 -fsyntax-only -Werror -verify -Wno-objc-root-class %s
2 // expected-no-diagnostics
3
4 struct X {
5 X();
6 void SortWithCollator();
7 };
8
9 @interface MyClass
10 - (void)someMethod;
11 @end
12
13 @implementation MyClass
14 - (void)someMethod {
15 [self privateMethod]; // clang already does not warn here
16 }
17
18 int bar(MyClass * myObject) {
19 [myObject privateMethod];
20 return gorfbar(myObject);
21 }
22 - (void)privateMethod { }
23
24 int gorfbar(MyClass * myObject) {
25 [myObject privateMethod];
26 [myObject privateMethod1];
27 return getMe + bar(myObject);
28 }
29
30 - (void)privateMethod1 {
31 getMe = getMe+1;
32 }
33
34 static int getMe;
35
36 static int test() {
37 return 0;
38 }
39
40 int x{17};
41
42 X::X() = default;
43 void X::SortWithCollator() {}
44 // pr13418
45 namespace {
46 int CurrentTabId() {return 0;}
47 }
48 @end