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

via cfe-commits cfe-commits at lists.llvm.org
Thu Aug 8 07:09:38 PDT 2024


================
@@ -38,3 +38,14 @@ Example:
 This check implements `F.19
 <http://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#Rf-forward>`_
 from the C++ Core Guidelines.
+
+
+Options
+-------
+
+.. option:: IgnoreStaticCasts
+
+   Boolean flag to allow users who want to use the forwarding reference as an
+   lvalue reference to convey he intention by using ``static_cast<T&>(t)`` to
+   disable warning. Default value is `false`.
+
----------------
EugeneZelenko wrote:

Excessive newline.

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


More information about the cfe-commits mailing list