[clang-tools-extra] [clang-tidy][cppcoreguidelines-missing-std-forward] Do not warn when the parameter is used in a `static_cast`. (PR #99477)
Clement Courbet via cfe-commits
cfe-commits at lists.llvm.org
Mon Jul 22 02:38:51 PDT 2024
================
@@ -129,15 +129,19 @@ void MissingStdForwardCheck::registerMatchers(MatchFinder *Finder) {
unless(anyOf(hasAncestor(typeLoc()),
hasAncestor(expr(hasUnevaluatedContext())))));
+ auto StaticCast = cxxStaticCastExpr(
+ hasSourceExpression(declRefExpr(to(equalsBoundNode("param")))));
----------------
legrosbuffle wrote:
Thanks for the suggestion, done. I've also adapted the matchers to handle expanded packs & added tests.
https://github.com/llvm/llvm-project/pull/99477
More information about the cfe-commits
mailing list