xref: /llvm-project/clang/test/FixIt/fixit-static-object-decl.m (revision 0f1c1be1968076d6f96f8a7bcc4a15cf195ecd97)
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
21NSArray func(void) {
22  NSArray P;
23  return P;
24}
25
26NSArray (func2)(void) { return 0; }
27
28#ifdef __cplusplus
29void test_result_type() {
30  auto l1 = [] () -> NSArray { return 0; };
31}
32#endif
33
34int main(void) {
35  	NSArray pluginNames = [NSArray arrayWithObjects];
36}
37