brintos

brintos / llvm-project-archived public Read only

0
0
Text · 811 B · a2dc89e Raw
49 lines · plain
1// RUN: %clang_cc1 -x objective-c++ -std=c++11 -fsyntax-only -Werror -verify -Wno-objc-root-class %s2// expected-no-diagnostics3 4struct X {5X();6void SortWithCollator();7};8 9@interface MyClass10- (void)someMethod;11@end12 13@implementation MyClass14- (void)someMethod {15    [self privateMethod];  // clang already does not warn here16}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;43void X::SortWithCollator() {}44// pr1341845namespace {46     int CurrentTabId() {return 0;}47}48@end49