]> granicus.if.org Git - clang/commitdiff
Reinstate test case accidentally reverted by r148028
authorDouglas Gregor <dgregor@apple.com>
Fri, 13 Jan 2012 16:56:26 +0000 (16:56 +0000)
committerDouglas Gregor <dgregor@apple.com>
Fri, 13 Jan 2012 16:56:26 +0000 (16:56 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148118 91177308-0d34-0410-b5e6-96231b3b80d8

test/SemaObjCXX/properties.mm

index 7ea8a48e4b6a4266d92443392651629b280c720e..d8d92e568796519262f0e307f27243f3bc4fb947 100644 (file)
@@ -46,15 +46,25 @@ namespace std {
   template<typename T> void count();
 }
 
-@interface Test4 {
+@interface Test4
+- (X&) prop;
+@end
+
+void test4(Test4 *t) {
+  (void)const_cast<const X&>(t.prop);
+  (void)dynamic_cast<X&>(t.prop);
+  (void)reinterpret_cast<int&>(t.prop);
+}
+
+@interface Test5 {
 @public
   int count;
 }
 @property int count;
 @end
 
-void test4(Test4* t4) {
-  if (t4.count < 2) { }
-  if (t4->count < 2) { }
+void test5(Test5* t5) {
+  if (t5.count < 2) { }
+  if (t5->count < 2) { }
 }