[Sema] Avoid crash for category implementation without interface
authorShoaib Meenai <smeenai@fb.com>
Tue, 27 Mar 2018 18:58:28 +0000 (18:58 +0000)
committerShoaib Meenai <smeenai@fb.com>
Tue, 27 Mar 2018 18:58:28 +0000 (18:58 +0000)
commitadf5a32ec57addb326ff6cd13f1e9e0a6a10bdb8
treedacb579967b152f1f1938186a4801906f82254b7
parent662f38b16f0ef69e0e55a0662d2fe68413e1e465
[Sema] Avoid crash for category implementation without interface

When we have a category implementation without a corresponding interface
(which is an error by itself), semantic checks for property accesses
will attempt to access a null interface declaration and then segfault.
Error out in such cases instead.

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

llvm-svn: 328654
clang/lib/Sema/SemaExprMember.cpp
clang/test/SemaObjC/undef-class-property-error.m [new file with mode: 0644]