[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:45 PDT 2020
MadCoder added a comment.
So the risk with that one is that if someone had say the `-didSomething` direct selector and that some UIKit/Apple SDK API now adds this as a thing that you use with CFNotification center for example, where you _need_ dynamism, then the uses of the API would warn all the time when the internal to the client project `-didSomething` is in scope.
So we ideally need a way to silence this warning, so at the very least this needs to be a new `-W` flag (on by default (?)) so that callers that have an issue can use a `_Pragma` at the call site to ignore the error for when it's legal.
I would suggest something like `-Wstrict-direct-dispatch` or something.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D82611/new/
https://reviews.llvm.org/D82611
More information about the cfe-commits
mailing list