[llvm-branch-commits] [libcxx] [libc++] Clang-tidy operator& hijacker. (PR #128366)
Mark de Wever via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Wed Mar 12 12:03:10 PDT 2025
mordante wrote:
> This check should be in regular Clang Tidy, using of `std::addressof` actual not only for libbcpp, any user-writted code might follow the guidline to use `std::addressof` instead of `operator&` for a generic type. For example, the Boost library: https://github.com/boostorg/pfr/blob/f09e6aeae9d050897fff72b93d5f5e866cc5e11a/include/boost/pfr/detail/core_name20_static.hpp#L196
>
> Please, look at the issue about it: #121172
As @philnik777 mentioned we like to add checks to our own plugin. Another benefit of our plugin is that the check is available in clang-tidy 19, 20, and HEAD and not just in HEAD.
Still I'm open to adding a similar check to the regular Clang Tidy. Then we can remove our own check once all libc++ supported clang-tidy versions have this check.
https://github.com/llvm/llvm-project/pull/128366
More information about the llvm-branch-commits
mailing list