This patch improves the mismatched destructor type error by detecting when the destructor call has used a '.' instead of a '->' on a pointer to the destructed type.
For example, when given the code sample below:
struct Bar { ~Bar(); }; void bar(Bar *object) { object.~Bar(); }
Clang will now produce the following diagnostic: error: member reference type 'Bar *' is a pointer; did you mean to use '->'?.