[TrailingObjects] Fix bug in "Convert classes in ExprObjC.h"

(Detected by asan)

llvm-svn: 256665
This commit is contained in:
James Y Knight 2015-12-31 06:01:19 +00:00
parent 822b4f20e0
commit db8cdd35b6
1 changed files with 2 additions and 1 deletions

View File

@ -59,7 +59,8 @@ ObjCDictionaryLiteral::ObjCDictionaryLiteral(ArrayRef<ObjCDictionaryElement> VK,
NumElements(VK.size()), HasPackExpansions(HasPackExpansions), Range(SR),
DictWithObjectsMethod(method) {
KeyValuePair *KeyValues = getTrailingObjects<KeyValuePair>();
ExpansionData *Expansions = getTrailingObjects<ExpansionData>();
ExpansionData *Expansions =
HasPackExpansions ? getTrailingObjects<ExpansionData>() : nullptr;
for (unsigned I = 0; I < NumElements; I++) {
if (VK[I].Key->isTypeDependent() || VK[I].Key->isValueDependent() ||
VK[I].Value->isTypeDependent() || VK[I].Value->isValueDependent())