| 1 |
// RUN: %clang_cc1 -x objective-c++ -Wno-return-type -fms-extensions -rewrite-objc -fobjc-runtime=macosx-fragile-10.5 %s -o %t-rw.cpp |
| 2 |
// RUN: %clang_cc1 -fsyntax-only -std=gnu++98 -Wno-address-of-temporary -D_Bool=bool -D"id=void*" -D"SEL=void*" -D"__declspec(X)=" %t-rw.cpp |
| 3 |
// RUN: %clang_cc1 -x objective-c++ -Wno-return-type -fms-extensions -rewrite-objc %s -o %t-modern-rw.cpp |
| 4 |
// RUN: %clang_cc1 -fsyntax-only -std=gnu++98 -Wno-address-of-temporary -D_Bool=bool -D"id=void*" -D"SEL=void*" -D"__declspec(X)=" %t-modern-rw.cpp |
| 5 |
|
| 6 |
typedef struct objc_class *Class; |
| 7 |
typedef unsigned NSPointerFunctionsOptions; |
| 8 |
extern "C" id NSClassFromObject(id object); |
| 9 |
void *sel_registerName(const char *); |
| 10 |
|
| 11 |
struct NSSlice { |
| 12 |
int i1; |
| 13 |
}; |
| 14 |
|
| 15 |
@interface NSConcretePointerFunctions { |
| 16 |
@public |
| 17 |
struct NSSlice slice; |
| 18 |
} |
| 19 |
- (bool)initializeSlice:(struct NSSlice *)slicep withOptions:(NSPointerFunctionsOptions)options; |
| 20 |
@end |
| 21 |
|
| 22 |
@implementation NSConcretePointerFunctions |
| 23 |
- (id)initWithOptions:(NSPointerFunctionsOptions)options { |
| 24 |
if (![NSClassFromObject(self) initializeSlice:&slice withOptions:options]) |
| 25 |
return 0; |
| 26 |
return self; |
| 27 |
} |
| 28 |
- (bool)initializeSlice:(struct NSSlice *)slicep withOptions:(NSPointerFunctionsOptions)options { |
| 29 |
return 0; |
| 30 |
} |
| 31 |
@end |
| 32 |
|
| 33 |
@interface I1 @end |
| 34 |
|
| 35 |
@implementation I1 |
| 36 |
+ (struct s1 *) f0 { |
| 37 |
return 0; |
| 38 |
} |
| 39 |
@end |