[Sema] Don't crash when recovering from a misspelled pseudo destructor call to an incomplete type.
When attempting to correct a misspelled pseudo destructor call as in:
struct Foo;
void foo(Foo *p) {
p.~Foo();
}
a call is made in canRecoverDotPseudoDestructorCallsOnPointerObjects
to LookupDestructor without checking that the record has a definition.
This causes an assertion later in LookupSpecialMember which assumes that
the record has a definition.
Patch By Roman Zhikharevich!
Differential Revision: https://reviews.llvm.org/D57111
Reviewed By: riccibruno
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@352047
91177308-0d34-0410-b5e6-
96231b3b80d8