[ObjC] Allow the use of implemented unavailable methods from within
the @implementation context
In Objective-C, it's common for some frameworks to mark some methods like init
as unavailable in the @interface to prohibit their usage. However, these
frameworks then often implemented said method and refer to it in another method
that acts as a factory for that object. The recent change to how messages to
self are type checked in clang (r349841) introduced a regression which started
to prohibit this pattern with an X is unavailable error. This commit addresses
the aforementioned regression.
rdar://
47134898
Differential Revision: https://reviews.llvm.org/D56469
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@350768
91177308-0d34-0410-b5e6-
96231b3b80d8