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