[PATCH] D49119: [Sema][ObjC] Issue a warning when a method declared in a protocol is non-escaping but the corresponding method in the implementation is escaping.

Volodymyr Sapsai via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Jul 25 17:59:49 PDT 2018


vsapsai added a comment.

In https://reviews.llvm.org/D49119#1176047, @ahatanak wrote:

> In https://reviews.llvm.org/D49119#1164285, @vsapsai wrote:
>
> > Also I had a few ideas for tests when the warning isn't required and it is absent. But I'm not sure they are actually valuable. If you are interested, we can discuss it in more details.
>
>
> Could you elaborate on what kind of tests you have in mind?




- declaring `noescape` on implementation when nothing like that was mentioned in interface or protocols;
- have class method and instance method with the same name, only one of them is `noescape`, test that we don't show spurious warning in this case;
- try selector names that look similar but are different, like `-foo`, `-foo:`, `-foo::` This test suggestion isn't really related to `noescape`, I just got carried away.


Repository:
  rC Clang

https://reviews.llvm.org/D49119





More information about the cfe-commits mailing list