blob: 4035d00b8a45a609fbc9c4906fbb8e282f7b06a8 [file] [log] [blame]
Fariborz Jahanian8be1ecd2012-07-03 23:22:13 +00001// RUN: %clang_cc1 -x objective-c++ -std=c++11 -fsyntax-only -Werror -verify -Wno-objc-root-class %s
Andy Gibbsc6e68da2012-10-19 12:44:48 +00002// expected-no-diagnostics
Fariborz Jahanian8be1ecd2012-07-03 23:22:13 +00003// rdar://10387088
4
5struct X {
6X();
Fariborz Jahanian8de79552012-07-05 19:34:20 +00007void SortWithCollator();
Fariborz Jahanian8be1ecd2012-07-03 23:22:13 +00008};
9
10@interface MyClass
11- (void)someMethod;
12@end
13
14@implementation MyClass
15- (void)someMethod {
16 [self privateMethod]; // clang already does not warn here
17}
18
19int bar(MyClass * myObject) {
20 [myObject privateMethod];
21 return gorfbar(myObject);
22}
23- (void)privateMethod { }
24
25int gorfbar(MyClass * myObject) {
26 [myObject privateMethod];
27 [myObject privateMethod1];
28 return getMe + bar(myObject);
29}
30
31- (void)privateMethod1 {
32 getMe = getMe+1;
33}
34
35static int getMe;
36
37static int test() {
38 return 0;
39}
40
41int x{17};
42
43X::X() = default;
Fariborz Jahanian8de79552012-07-05 19:34:20 +000044void X::SortWithCollator() {}
Fariborz Jahaniandeb144a2012-07-20 17:19:54 +000045// pr13418
46namespace {
47 int CurrentTabId() {return 0;}
48}
Fariborz Jahanian8be1ecd2012-07-03 23:22:13 +000049@end