1 // RUN: %clang_cc1 -E %s -o %t.mm
2 // RUN: %clang_cc1 -x objective-c++ -fms-extensions -rewrite-objc %t.mm -o %t-rw.cpp
3 // RUN: FileCheck --input-file=%t-rw.cpp %s
4 // RUN: %clang_cc1 -fsyntax-only -std=gnu++98 -Werror -DSEL="void *" -Did="struct objc_object *" -Wno-attributes -Wno-address-of-temporary -U__declspec -D"__declspec(X)=" %t-rw.cpp
7 extern "C" void *sel_registerName(const char *);
15 @interface SynthItAll : NSObject
16 @property int howMany;
17 @property (retain) NSString* what;
20 @implementation SynthItAll
24 @interface SynthSetter : NSObject
25 @property (nonatomic) int howMany;
26 @property (nonatomic, retain) NSString* what;
29 @implementation SynthSetter
34 // - (void) setHowMany: (int) value
39 // - (void) setWhat: (NSString*) value
43 @interface SynthGetter : NSObject
44 @property (nonatomic) int howMany;
45 @property (nonatomic, retain) NSString* what;
48 @implementation SynthGetter
50 - (void) setHowMany: (int) value {
55 - (void) setWhat: (NSString*) value {
58 _what = [value retain];
75 @implementation NONAME
78 // CHECK: (*(int *)((char *)self + OBJC_IVAR_$_SynthItAll$_howMany)) = howMany;
79 // CHECK: return (*(int *)((char *)self + OBJC_IVAR_$_SynthGetter$_howMany));
80 // CHECK: (*(TBAR *)((char *)self + OBJC_IVAR_$_NONAME$_bad)) = bad;