diff options
| author | Fariborz Jahanian <fjahanian@apple.com> | 2009-09-06 19:44:57 +0000 |
|---|---|---|
| committer | Fariborz Jahanian <fjahanian@apple.com> | 2009-09-06 19:44:57 +0000 |
| commit | f0ff9832ba6dd0449ba610e4b744cf4affa20ab8 (patch) | |
| tree | 0c5e523ca1835b53c034f72b88c1e386df8f61bd /clang/test/CodeGenObjC | |
| parent | bfb9719dadeb463fd781cfe8a31aa72ca3bc5179 (diff) | |
| download | bcm5719-llvm-f0ff9832ba6dd0449ba610e4b744cf4affa20ab8.tar.gz bcm5719-llvm-f0ff9832ba6dd0449ba610e4b744cf4affa20ab8.zip | |
Test for generation of objc_assign_strongCast in a variety of
situations.
llvm-svn: 81129
Diffstat (limited to 'clang/test/CodeGenObjC')
| -rw-r--r-- | clang/test/CodeGenObjC/objc2-strong-cast-3.m | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/clang/test/CodeGenObjC/objc2-strong-cast-3.m b/clang/test/CodeGenObjC/objc2-strong-cast-3.m new file mode 100644 index 00000000000..1b5a58cf188 --- /dev/null +++ b/clang/test/CodeGenObjC/objc2-strong-cast-3.m @@ -0,0 +1,41 @@ +// RUN: clang-cc -triple x86_64-apple-darwin10 -fobjc-gc -emit-llvm -o %t %s && +// RUN: grep objc_assign_strongCast %t | count 6 && +// RUN: true + +@interface I @end + +typedef I TI; +typedef I* TPI; + +typedef id ID; + +@interface MyClass { +} + +@property id property; +@property I* propertyI; + +@property TI* propertyTI; + +@property TPI propertyTPI; + +@property ID propertyID; +@end + +@implementation MyClass + @synthesize property=_property; + @synthesize propertyI; + @synthesize propertyTI=_propertyTI; + @synthesize propertyTPI=_propertyTPI; + @synthesize propertyID = _propertyID; +@end + +int main () { + MyClass *myObj; + myObj.property = 0; + myObj.propertyI = 0; + myObj.propertyTI = 0; + myObj.propertyTPI = 0; + myObj.propertyID = 0; + return 0; +} |

