summaryrefslogtreecommitdiffstats
path: root/clang/test/SemaObjC/call-unavailable-init-in-self.m
Commit message (Collapse)AuthorAgeFilesLines
* [ObjC] Follow-up r350768 and allow the use of unavailable methods that areAlex Lorenz2019-01-171-2/+20
| | | | | | | | | | | | | | | | declared in a parent class from within the @implementation context This commit extends r350768 and allows the use of methods marked as unavailable that are declared in a parent class/category from within the @implementation of the class where the method is marked as unavailable. This allows users to call init that's marked as unavailable even if they don't define it. rdar://47134898 Differential Revision: https://reviews.llvm.org/D56816 llvm-svn: 351459
* [ObjC] Allow the use of implemented unavailable methods from withinAlex Lorenz2019-01-091-0/+68
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 llvm-svn: 350768
OpenPOWER on IntegriCloud