[attributes] Generalize attribute 'enforce_tcb' to Objective-C methods.
authorPierre d'Herbemont <pdherbemont@apple.com>
Mon, 28 Mar 2022 20:24:02 +0000 (13:24 -0700)
committerArtem Dergachev <artem.dergachev@gmail.com>
Mon, 28 Mar 2022 22:08:47 +0000 (15:08 -0700)
commitc8048c7c42ffd1731149b0abe15b9081dd27c789
tree68fb5c990d777480825a9a9ad4a4626df65baf1f
parent1721d52a62067b8a5ceec58b417b2c73ad870b13
[attributes] Generalize attribute 'enforce_tcb' to Objective-C methods.

Calling an ObjC method from a C function marked with the 'enforce_tcb'
attribute did not produce a warning. Now it does, and on top of that
Objective-C methods can participate in TCBs themselves.

Differential Revision: https://reviews.llvm.org/D122343
clang/include/clang/Basic/Attr.td
clang/include/clang/Sema/Sema.h
clang/lib/Sema/SemaChecking.cpp
clang/test/Misc/pragma-attribute-supported-attributes-list.test
clang/test/Sema/attr-enforce-tcb-errors.m [new file with mode: 0644]
clang/test/Sema/attr-enforce-tcb.m [new file with mode: 0644]