blob: fbdf8bad0aa769e39311ec3ce31592137333539b [file] [log] [blame]
Fariborz Jahanianb0ed95c2012-07-03 23:22:13 +00001// 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();
Fariborz Jahanian39700f82012-07-05 19:34:20 +00006void SortWithCollator();
Fariborz Jahanianb0ed95c2012-07-03 23:22:13 +00007};
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
18int bar(MyClass * myObject) {
19 [myObject privateMethod];
20 return gorfbar(myObject);
21}
22- (void)privateMethod { }
23
24int 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
34static int getMe;
35
36static int test() {
37 return 0;
38}
39
40int x{17};
41
42X::X() = default;
Fariborz Jahanian39700f82012-07-05 19:34:20 +000043void X::SortWithCollator() {}
Fariborz Jahanianb0ed95c2012-07-03 23:22:13 +000044@end