39 lines · plain
1// Objective-C recovery2// RUN: cp %s %t3// RUN: not %clang_cc1 -pedantic -Wall -fixit -x objective-c %t4// RUN: %clang_cc1 -fsyntax-only -pedantic -Wall -Werror -x objective-c %t5 6// Objective-C++ recovery7// RUN: cp %s %t8// RUN: not %clang_cc1 -pedantic -Wall -fixit -x objective-c++ %t9// RUN: %clang_cc1 -fsyntax-only -pedantic -Wall -Werror -x objective-c++ %t10 11@interface A12- (int)method1:(int)x second:(float)y;13+ (int)method2:(int)x second:(double)y;14- (int)getBlah;15@end16 17void f(A *a, int i, int j) {18 a method1:5+2 second:+(3.14159)];19 a method1:[a method1:3 second:j] second:i++]20 a getBlah];21 22 int array[17];23 (void)array[a method1:5+2 second:+(3.14159)]];24 (A method2:5+2 second:3.14159]);25 A method2:5+2 second:3.14159]26 if (A method2:5+2 second:3.14159]) { }27}28 29@interface B : A30- (int)method1:(int)x second:(float)y;31@end32 33@implementation B34- (int)method1:(int)x second:(float)y {35 super method1:x second:y];36 return super getBlah];37}38@end39