summaryrefslogtreecommitdiffstats
path: root/clang/test/SemaObjCXX/objc-container-subscripting.mm
diff options
context:
space:
mode:
authorFariborz Jahanian <fjahanian@apple.com>2012-03-28 17:56:49 +0000
committerFariborz Jahanian <fjahanian@apple.com>2012-03-28 17:56:49 +0000
commitba0afde486f5f6b9d31e970fcf387c021c7bc2ba (patch)
tree05b6f5651975ba2fca1895f45d55de23ba5169b1 /clang/test/SemaObjCXX/objc-container-subscripting.mm
parent726bc52a2e5fc9aab54b09db3042f609d7339409 (diff)
downloadbcm5719-llvm-ba0afde486f5f6b9d31e970fcf387c021c7bc2ba.tar.gz
bcm5719-llvm-ba0afde486f5f6b9d31e970fcf387c021c7bc2ba.zip
objective-c: Improve diagnostics and
provide 'fixit' hint when dictionary index is not of proper type. // rdar://11062080 llvm-svn: 153584
Diffstat (limited to 'clang/test/SemaObjCXX/objc-container-subscripting.mm')
-rw-r--r--clang/test/SemaObjCXX/objc-container-subscripting.mm4
1 files changed, 2 insertions, 2 deletions
diff --git a/clang/test/SemaObjCXX/objc-container-subscripting.mm b/clang/test/SemaObjCXX/objc-container-subscripting.mm
index ccbc45e3b4c..7591c3b0986 100644
--- a/clang/test/SemaObjCXX/objc-container-subscripting.mm
+++ b/clang/test/SemaObjCXX/objc-container-subscripting.mm
@@ -32,8 +32,8 @@ template void test_dictionary_subscripts(NSMutableDictionary*, id, int); // expe
template<typename T, typename U, typename O>
void test_array_subscripts(T base, U index, O obj) {
- base[index] = obj; // expected-error {{expected method to write dictionary element not found on object of type 'NSMutableArray *'}}
- obj = base[index]; // expected-error {{expected method to read dictionary element not found on object of type 'NSMutableArray *'}}
+ base[index] = obj; // expected-error {{indexing expression is invalid because subscript type 'double' is not an intergal or objective-C pointer type}}
+ obj = base[index]; // expected-error {{indexing expression is invalid because subscript type 'double' is not an intergal or objective-C pointer type}}
}
template void test_array_subscripts(NSMutableArray *, int, id);
OpenPOWER on IntegriCloud