llvm-capstone/clang/test/FixIt/fixit-static-object-decl.m
Eli Friedman 31a5bcc24e Unify return type checking for functions and ObjC methods. Move all the
random checks for ObjC object return types to SemaType.cpp.

Fixes issue with ObjC method type checking reported on cfe-dev.

llvm-svn: 184006
2013-06-14 21:14:10 +00:00

38 lines
679 B
Objective-C

// Objective-C recovery
// RUN: cp %s %t
// RUN: not %clang_cc1 -fixit -x objective-c %t
// RUN: %clang_cc1 -fsyntax-only -Werror -x objective-c %t
// Objective-C++ recovery
// RUN: cp %s %t
// RUN: not %clang_cc1 -fixit -x objective-c++ %t -std=c++11
// RUN: %clang_cc1 -fsyntax-only -Werror -x objective-c++ %t -std=c++11
// rdar://9603056
@interface S @end
@interface NSArray
{
@public
S iS;
}
+ (id) arrayWithObjects;
@end
NSArray func() {
NSArray P;
return P;
}
NSArray (func2)() { return 0; }
#ifdef __cplusplus
void test_result_type() {
auto l1 = [] () -> NSArray { return 0; };
}
#endif
int main() {
NSArray pluginNames = [NSArray arrayWithObjects];
}