[ODRHash] Fix null pointer dereference for ObjC selectors with empty slots.
authorVolodymyr Sapsai <vsapsai@apple.com>
Fri, 28 Jun 2019 17:42:17 +0000 (17:42 +0000)
committerVolodymyr Sapsai <vsapsai@apple.com>
Fri, 28 Jun 2019 17:42:17 +0000 (17:42 +0000)
commit5f8b9092fff47437b03e6f5e67e0f6c0c036bc6c
tree4fe4e10b4162fdc45f11ab30b4a67982487e1283
parent021d2f209339ace33bd83e99c45507d0fe92f44b
[ODRHash] Fix null pointer dereference for ObjC selectors with empty slots.

`Selector::getIdentifierInfoForSlot` returns NULL if a slot has no
corresponding identifier. Add a boolean to the hash and a NULL check.

rdar://problem/51615164

Reviewers: rtrieu

Reviewed By: rtrieu

Subscribers: dexonsmith, cfe-commits, jkorous

Differential Revision: https://reviews.llvm.org/D63789

llvm-svn: 364664
clang/lib/AST/ODRHash.cpp
clang/test/Modules/odr_hash.mm