[Sema][ObjC++] Typo correction should handle ivars and properties

After r260016 and r260017 disabled typo correction for ivars and properties
clang didn't report errors about unresolved identifier in the base of ivar and
property ref expressions. This meant that clang invoked CodeGen on invalid AST
which then caused a crash.

This commit re-enables typo correction for ivars and properites, and fixes the
PR25113 & PR26486 (that were originally fixed in r260017 and r260016) in a
different manner by transforming the Objective-C ivar reference expression with
'IsFreeIvar' preserved.

rdar://30310772

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@294008 91177308-0d34-0410-b5e6-96231b3b80d8
(cherry picked from commit 7fa24c03e4984bff3c27830365cefba55c4260ea)
3 files changed