[SemaObjC] Add a warning for @selector expressions that potentially refer to objc_dir...
authorErik Pilkington <erik.pilkington@gmail.com>
Thu, 25 Jun 2020 20:10:46 +0000 (16:10 -0400)
committerErik Pilkington <erik.pilkington@gmail.com>
Tue, 7 Jul 2020 17:29:54 +0000 (13:29 -0400)
commit7437a9496528b838e6939dbcbb69a0acb5e1332d
tree2cccb8bea7989e920f1aa3b99219f3f6e52a847f
parent62ba48b45f6525a3e453b54a6e5562d2f3dc7324
[SemaObjC] Add a warning for @selector expressions that potentially refer to objc_direct methods

By default, only warn when the selector matches a direct method in the current
class. This commit also adds a more strict off-by-default warning when there
isn't a non-direct method in the current class.

rdar://64621668

Differential revision: https://reviews.llvm.org/D82611
clang/include/clang/Basic/DiagnosticGroups.td
clang/include/clang/Basic/DiagnosticSemaKinds.td
clang/lib/Sema/SemaExprObjC.cpp
clang/test/SemaObjC/potentially-direct-selector.m [new file with mode: 0644]