summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema
diff options
context:
space:
mode:
authorFariborz Jahanian <fjahanian@apple.com>2014-09-10 20:55:31 +0000
committerFariborz Jahanian <fjahanian@apple.com>2014-09-10 20:55:31 +0000
commitd13951ff2feefe5bda0065ffb799874e86bc36e1 (patch)
tree83b7f227da92e3f18ba64019e23f76c87e8720fa /clang/lib/Sema
parent7f0f17b3fb5aa9c43e5952724dfc23814c9cba29 (diff)
downloadbcm5719-llvm-d13951ff2feefe5bda0065ffb799874e86bc36e1.tar.gz
bcm5719-llvm-d13951ff2feefe5bda0065ffb799874e86bc36e1.zip
Objective-C. Accept 'nil' as indexing argument to
dictionary literals since the API which implements them accepts it too. // rdar://18254621 llvm-svn: 217543
Diffstat (limited to 'clang/lib/Sema')
-rw-r--r--clang/lib/Sema/SemaPseudoObject.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/clang/lib/Sema/SemaPseudoObject.cpp b/clang/lib/Sema/SemaPseudoObject.cpp
index b81b60c802e..7bfe3337494 100644
--- a/clang/lib/Sema/SemaPseudoObject.cpp
+++ b/clang/lib/Sema/SemaPseudoObject.cpp
@@ -1022,7 +1022,8 @@ Sema::ObjCSubscriptKind
// If we don't have a class type in C++, there's no way we can get an
// expression of integral or enumeration type.
const RecordType *RecordTy = T->getAs<RecordType>();
- if (!RecordTy && T->isObjCObjectPointerType())
+ if (!RecordTy &&
+ (T->isObjCObjectPointerType() || T->isVoidPointerType()))
// All other scalar cases are assumed to be dictionary indexing which
// caller handles, with diagnostics if needed.
return OS_Dictionary;
OpenPOWER on IntegriCloud