[clang-tools-extra] [clang-tidy][cppcoreguidelines-missing-std-forward] Do not warn when the parameter is used in a `static_cast`. (PR #99477)

Piotr Zegar via cfe-commits cfe-commits at lists.llvm.org
Thu Jul 18 11:27:42 PDT 2024


https://github.com/PiotrZSL requested changes to this pull request.

This shouldn't be default behavior. 
Add support for this behavior under dedicated option that need to be opt-in.

For context, we had problem in our project with some other check recently. Simply check allowed to ignore return value by casting it to void, and developer added blindly that cast and hide an issue. There is nothing wrong with allowing to silent issues in other way than NOLINT, but that should be always put into configuration, so an default behavior would be an more safe one.

https://github.com/llvm/llvm-project/pull/99477


More information about the cfe-commits mailing list