[cfe-commits] r81129 - /cfe/trunk/test/CodeGenObjC/objc2-strong-cast-3.m

Fariborz Jahanian fjahanian at apple.com
Sun Sep 6 12:44:58 PDT 2009


Author: fjahanian
Date: Sun Sep  6 14:44:57 2009
New Revision: 81129

URL: http://llvm.org/viewvc/llvm-project?rev=81129&view=rev
Log:
Test for generation of objc_assign_strongCast in a variety of
situations.


Added:
    cfe/trunk/test/CodeGenObjC/objc2-strong-cast-3.m

Added: cfe/trunk/test/CodeGenObjC/objc2-strong-cast-3.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenObjC/objc2-strong-cast-3.m?rev=81129&view=auto

==============================================================================
--- cfe/trunk/test/CodeGenObjC/objc2-strong-cast-3.m (added)
+++ cfe/trunk/test/CodeGenObjC/objc2-strong-cast-3.m Sun Sep  6 14:44:57 2009
@@ -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
+
+ at interface I @end
+
+typedef I TI;
+typedef I* TPI;
+
+typedef id ID;
+
+ at interface MyClass {
+}
+
+ at property id property;
+ at property I* propertyI;
+
+ at property TI* propertyTI;
+
+ at property TPI propertyTPI;
+
+ at property ID propertyID;
+ at end
+
+ at implementation MyClass
+	@synthesize property=_property;
+        @synthesize propertyI;
+        @synthesize propertyTI=_propertyTI;
+        @synthesize propertyTPI=_propertyTPI;
+         @synthesize propertyID = _propertyID;
+ at end
+
+int main () {
+    MyClass *myObj;
+    myObj.property = 0;
+    myObj.propertyI = 0;
+    myObj.propertyTI = 0;
+    myObj.propertyTPI = 0;
+    myObj.propertyID = 0;
+    return 0;
+}





More information about the cfe-commits mailing list