[clang] [llvm] [Clang][SME] Detect always_inline used with mismatched streaming attributes (PR #77936)
Sander de Smalen via llvm-commits
llvm-commits at lists.llvm.org
Thu Jan 18 03:44:39 PST 2024
sdesmalen-arm wrote:
> There's no general rule that forbids taking the address of an always_inline function. So if a user really wants to, they can call a mismatched always_inline function anyway. Given that, making this a hard error seems a bit dubious; it should probably be a warning instead.
FWIW, the GNU documentation on `always_inline` says:
> Failure to inline such a function is diagnosed as an error. Note that if such a function is called indirectly the compiler may or may not inline it depending on optimization level and a failure to inline an indirect call may or may not be diagnosed.
Clang and GCC emit an error for e.g. mismatching target attributes: https://godbolt.org/z/ddThn67sa
https://github.com/llvm/llvm-project/pull/77936
More information about the llvm-commits
mailing list