From: Douglas Gregor Date: Fri, 13 Jan 2012 16:56:26 +0000 (+0000) Subject: Reinstate test case accidentally reverted by r148028 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=fdf187c4cb7ebfaeebe96ddba189da34027e0b22;p=clang Reinstate test case accidentally reverted by r148028 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148118 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/test/SemaObjCXX/properties.mm b/test/SemaObjCXX/properties.mm index 7ea8a48e4b..d8d92e5687 100644 --- a/test/SemaObjCXX/properties.mm +++ b/test/SemaObjCXX/properties.mm @@ -46,15 +46,25 @@ namespace std { template void count(); } -@interface Test4 { +@interface Test4 +- (X&) prop; +@end + +void test4(Test4 *t) { + (void)const_cast(t.prop); + (void)dynamic_cast(t.prop); + (void)reinterpret_cast(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) { } }