[clang-tools-extra] [clang-tidy][cppcoreguidelines-missing-std-forward] Do not warn when the parameter is used in a `static_cast`. (PR #99477)
Julian Schmidt via cfe-commits
cfe-commits at lists.llvm.org
Thu Jul 18 10:01:21 PDT 2024
https://github.com/5chmidti commented:
I agree that this should be off by default or the guidelines have to be amended if this is to be on by default.
It sounds to me like the enforcement of the rule does not account for having a forwarding reference as a parameter and using it instead of forwarding it. Being explicit with a `static_cast` sounds like a possible solution when using the parameter in a specific way instead of forwarding it. But I think we should be careful and get more reviewers chiming in with their thoughts.
I'll check some test scenarios later.
https://github.com/llvm/llvm-project/pull/99477
More information about the cfe-commits
mailing list