diff options
| author | Fariborz Jahanian <fjahanian@apple.com> | 2014-09-10 22:12:13 +0000 |
|---|---|---|
| committer | Fariborz Jahanian <fjahanian@apple.com> | 2014-09-10 22:12:13 +0000 |
| commit | a00a6526dc5b3529bc94ad50f01f87b51154952f (patch) | |
| tree | a0b4c2aad638a1c52cb4a18ffb6caa9a378be0bb /clang | |
| parent | 16e313343d6748e385f3b23b98397efe0d5f93ce (diff) | |
| download | bcm5719-llvm-a00a6526dc5b3529bc94ad50f01f87b51154952f.tar.gz bcm5719-llvm-a00a6526dc5b3529bc94ad50f01f87b51154952f.zip | |
More test for "void *" argument as index of a dictionary literal.
llvm-svn: 217555
Diffstat (limited to 'clang')
| -rw-r--r-- | clang/test/SemaObjC/objc-dictionary-literal.m | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/clang/test/SemaObjC/objc-dictionary-literal.m b/clang/test/SemaObjC/objc-dictionary-literal.m index 718658e8c9b..f9fd57f2dae 100644 --- a/clang/test/SemaObjC/objc-dictionary-literal.m +++ b/clang/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; } |

