1// Objective-C recovery 2// RUN: cp %s %t 3// RUN: not %clang_cc1 -fixit -x objective-c %t 4// RUN: %clang_cc1 -fsyntax-only -Werror -x objective-c %t 5 6// Objective-C++ recovery 7// RUN: cp %s %t 8// RUN: not %clang_cc1 -fixit -x objective-c++ %t -std=c++11 9// RUN: %clang_cc1 -fsyntax-only -Werror -x objective-c++ %t -std=c++11 10// rdar://9603056 11 12@interface S @end 13 14@interface NSArray 15{ 16@public 17 S iS; 18} 19+ (id) arrayWithObjects; 20@end 21 22NSArray func() { 23 NSArray P; 24 return P; 25} 26 27NSArray (func2)() { return 0; } 28 29#ifdef __cplusplus 30void test_result_type() { 31 auto l1 = [] () -> NSArray { return 0; }; 32} 33#endif 34 35int main() { 36 NSArray pluginNames = [NSArray arrayWithObjects]; 37} 38