r217555 - More test for "void *" argument as index of a dictionary literal.
Fariborz Jahanian
fjahanian at apple.com
Wed Sep 10 15:12:13 PDT 2014
Author: fjahanian
Date: Wed Sep 10 17:12:13 2014
New Revision: 217555
URL: http://llvm.org/viewvc/llvm-project?rev=217555&view=rev
Log:
More test for "void *" argument as index of a dictionary literal.
Modified:
cfe/trunk/test/SemaObjC/objc-dictionary-literal.m
Modified: cfe/trunk/test/SemaObjC/objc-dictionary-literal.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaObjC/objc-dictionary-literal.m?rev=217555&r1=217554&r2=217555&view=diff
==============================================================================
--- cfe/trunk/test/SemaObjC/objc-dictionary-literal.m (original)
+++ cfe/trunk/test/SemaObjC/objc-dictionary-literal.m Wed Sep 10 17:12:13 2014
@@ -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;
}
More information about the cfe-commits
mailing list