diff options
author | Douglas Gregor <dgregor@apple.com> | 2012-01-13 16:56:26 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2012-01-13 16:56:26 +0000 |
commit | fdf187c4cb7ebfaeebe96ddba189da34027e0b22 (patch) | |
tree | 7391083b413f4abd1adc62a3b963235af35cd0e0 | |
parent | 3a110f75acafc992cb664200cebec90520986715 (diff) |
Reinstate test case accidentally reverted by r148028
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148118 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | test/SemaObjCXX/properties.mm | 18 |
1 files changed, 14 insertions, 4 deletions
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<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) { } } |