summaryrefslogtreecommitdiffstats
path: root/lib/Sema/SemaPseudoObject.cpp
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
commit4c10fa8a535ea37566dec0a4914d038be6d0e7bc (patch)
treef4b981e5321d60e8c61dadc6f5607e4668773400 /lib/Sema/SemaPseudoObject.cpp
parent8b2a7513756630eb7aaf2497010ad5764b805f40 (diff)
Objective-C. Accept 'nil' as indexing argument to
dictionary literals since the API which implements them accepts it too. // rdar://18254621 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@217543 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaPseudoObject.cpp')
-rw-r--r--lib/Sema/SemaPseudoObject.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/Sema/SemaPseudoObject.cpp b/lib/Sema/SemaPseudoObject.cpp
index b81b60c802..7bfe333749 100644
--- a/lib/Sema/SemaPseudoObject.cpp
+++ b/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;