| 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 |
|
| 11 |
@interface S @end |
| 12 |
|
| 13 |
@interface NSArray |
| 14 |
{ |
| 15 |
@public |
| 16 |
S iS; |
| 17 |
} |
| 18 |
+ (id) arrayWithObjects; |
| 19 |
@end |
| 20 |
|
| 21 |
NSArray func(void) { |
| 22 |
NSArray P; |
| 23 |
return P; |
| 24 |
} |
| 25 |
|
| 26 |
NSArray (func2)(void) { return 0; } |
| 27 |
|
| 28 |
#ifdef __cplusplus |
| 29 |
void test_result_type() { |
| 30 |
auto l1 = [] () -> NSArray { return 0; }; |
| 31 |
} |
| 32 |
#endif |
| 33 |
|
| 34 |
int main(void) { |
| 35 |
NSArray pluginNames = [NSArray arrayWithObjects]; |
| 36 |
} |