[PATCH] D82611: [SemaObjC] Add a warning for @selector expressions that potentially refer to objc_direct methods

Pierre Habouzit via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Jul 1 09:42:48 PDT 2020


MadCoder added inline comments.


================
Comment at: clang/test/SemaObjC/potentially-direct-selector.m:84
+  (void)@selector(inBaseCat);
+  (void)@selector(inBaseCatImpl);
+  (void)@selector(inDerived);
----------------
I think this might be too weak, if we add a warning then maybe what we want is a tri-state:

`-Wstrict-direct-dispatch=none|self|all`

because I can see cases where the heuristic here would be too weak


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D82611/new/

https://reviews.llvm.org/D82611





More information about the cfe-commits mailing list