[objc_direct] also go through implementations when looking for clashes
authorPierre Habouzit <phabouzit@apple.com>
Mon, 23 Mar 2020 22:10:03 +0000 (15:10 -0700)
committerPierre Habouzit <phabouzit@apple.com>
Tue, 24 Mar 2020 03:49:09 +0000 (20:49 -0700)
commit20d704a75ed51c7a9a155aa3978d0c02671c3f69
tree0766bcb409fa13338076a03cc04eef126b9b2502
parentdab219eedd29fdadf6599224c54c6fd74637cb41
[objc_direct] also go through implementations when looking for clashes

Some methods are sometimes declared in the @implementation blocks which
can cause undiagnosed clashes.

Just write a checkObjCDirectMethodClashes() for this purpose.

Also make sure that "unavailable" selectors do not inherit
objc_direct_members.

Differential Revision: https://reviews.llvm.org/D76643
Signed-off-by: Pierre Habouzit <phabouzit@apple.com>
Radar-ID: rdar://problem/59332804, rdar://problem/59782963
clang/lib/Sema/SemaDeclObjC.cpp
clang/test/SemaObjC/method-direct-one-definition.m
clang/test/SemaObjC/method-direct.m