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
6 extern "C" void *sel_registerName(const char *);
14 @interface SynthItAll : NSObject
15 @property int howMany;
16 @property (retain) NSString* what;
19 @implementation SynthItAll
23 @interface SynthSetter : NSObject
24 @property (nonatomic) int howMany;
25 @property (nonatomic, retain) NSString* what;
28 @implementation SynthSetter
33 // - (void) setHowMany: (int) value
38 // - (void) setWhat: (NSString*) value
42 @interface SynthGetter : NSObject
43 @property (nonatomic) int howMany;
44 @property (nonatomic, retain) NSString* what;
47 @implementation SynthGetter
49 - (void) setHowMany: (int) value {
54 - (void) setWhat: (NSString*) value {
57 _what = [value retain];
74 @implementation NONAME
77 // CHECK: (*(int *)((char *)self + OBJC_IVAR_$_SynthItAll$_howMany)) = howMany;
78 // CHECK: return (*(int *)((char *)self + OBJC_IVAR_$_SynthGetter$_howMany));
79 // CHECK: (*(TBAR *)((char *)self + OBJC_IVAR_$_NONAME$_bad)) = bad;