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

Piotr Zegar via cfe-commits cfe-commits at lists.llvm.org
Mon Jul 22 11:37:12 PDT 2024


================
@@ -129,15 +131,25 @@ void MissingStdForwardCheck::registerMatchers(MatchFinder *Finder) {
       unless(anyOf(hasAncestor(typeLoc()),
                    hasAncestor(expr(hasUnevaluatedContext())))));
 
+  auto StaticCast =
+      Options.get("IgnoreStaticCasts", false)
----------------
PiotrZSL wrote:

thats not a valid way to add options, please move this to constructor, and change storeOptions.

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


More information about the cfe-commits mailing list