[PATCH] D101598: [clang][Sema] adds `[[clang::no_address]]` attribute
Dávid Bolvanský via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Apr 30 11:36:08 PDT 2021
xbolva00 added a comment.
In D101598#2729865 <https://reviews.llvm.org/D101598#2729865>, @ldionne wrote:
> Just for posterity, what we discussed is that since there is a list of addressable functions in the standard, we should explore adding a warning to Clang that fires whenever somebody takes the address of a function in namespace `std`, except if it's an addressable function. That list would either be maintained explicitly in Clang, or, preferably, we'd have an attribute that we can mark addressable functions with so that the compiler doesn't flag those specific functions.
>
> I'm not sure whether that is actually a good approach, but I told @cjdb that from the library perspective, I was more comfortable with marking a few functions with that attribute than marking basically everything in the library with `[[noaddress]]`.
Maybe opportunity to rework https://reviews.llvm.org/D58882 :)
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D101598/new/
https://reviews.llvm.org/D101598
More information about the cfe-commits
mailing list