From: Fariborz Jahanian Date: Wed, 10 Sep 2014 22:12:13 +0000 (+0000) Subject: More test for "void *" argument as index of a dictionary literal. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=b406706dca2f2648c8602e67df0360415ed757ec;p=clang More test for "void *" argument as index of a dictionary literal. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@217555 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/test/SemaObjC/objc-dictionary-literal.m b/test/SemaObjC/objc-dictionary-literal.m index 718658e8c9..f9fd57f2da 100644 --- a/test/SemaObjC/objc-dictionary-literal.m +++ b/test/SemaObjC/objc-dictionary-literal.m @@ -28,6 +28,7 @@ typedef long NSInteger; - (void)setObject:(id)object atIndexedSubscript:(NSInteger)index; @end +void *pvoid; int main() { NSDictionary *dict = @{ @"name":@666 }; dict[@"name"] = @666; @@ -37,9 +38,13 @@ int main() { // rdar://18254621 [@{@"foo" : @"bar"} objectForKeyedSubscript:nil]; (void)@{@"foo" : @"bar"}[nil]; + [@{@"foo" : @"bar"} objectForKeyedSubscript:pvoid]; + (void)@{@"foo" : @"bar"}[pvoid]; [@{@"foo" : @"bar"} setObject:nil forKeyedSubscript:@"gorf"]; @{@"foo" : @"bar"}[nil] = @"gorf"; + [@{@"foo" : @"bar"} setObject:pvoid forKeyedSubscript:@"gorf"]; + @{@"foo" : @"bar"}[pvoid] = @"gorf"; return 0; }