Fariborz Jahanian | dcf1011 | 2011-07-25 21:12:27 +0000 | [diff] [blame] | 1 | // Objective-C recovery |
| 2 | // RUN: cp %s %t |
Richard Smith | 2315318 | 2011-09-06 03:01:15 +0000 | [diff] [blame^] | 3 | // RUN: not %clang_cc1 -fixit -x objective-c %t |
Fariborz Jahanian | dcf1011 | 2011-07-25 21:12:27 +0000 | [diff] [blame] | 4 | // RUN: %clang_cc1 -fsyntax-only -Werror -x objective-c %t |
| 5 | |
| 6 | // Objective-C++ recovery |
| 7 | // RUN: cp %s %t |
Richard Smith | 2315318 | 2011-09-06 03:01:15 +0000 | [diff] [blame^] | 8 | // RUN: not %clang_cc1 -fixit -x objective-c++ %t |
Fariborz Jahanian | dcf1011 | 2011-07-25 21:12:27 +0000 | [diff] [blame] | 9 | // RUN: %clang_cc1 -fsyntax-only -Werror -x objective-c++ %t |
| 10 | // rdar://9603056 |
| 11 | |
Fariborz Jahanian | 8eaefdc | 2011-07-26 17:58:54 +0000 | [diff] [blame] | 12 | @interface S @end |
| 13 | |
Fariborz Jahanian | dcf1011 | 2011-07-25 21:12:27 +0000 | [diff] [blame] | 14 | @interface NSArray |
Fariborz Jahanian | 8eaefdc | 2011-07-26 17:58:54 +0000 | [diff] [blame] | 15 | { |
| 16 | @public |
| 17 | S iS; |
| 18 | } |
Fariborz Jahanian | dcf1011 | 2011-07-25 21:12:27 +0000 | [diff] [blame] | 19 | + (id) arrayWithObjects; |
| 20 | @end |
| 21 | |
Fariborz Jahanian | 8eaefdc | 2011-07-26 17:58:54 +0000 | [diff] [blame] | 22 | NSArray func() { |
| 23 | NSArray P; |
| 24 | return P; |
| 25 | } |
| 26 | |
Fariborz Jahanian | dcf1011 | 2011-07-25 21:12:27 +0000 | [diff] [blame] | 27 | int main() { |
| 28 | NSArray pluginNames = [NSArray arrayWithObjects]; |
| 29 | } |