[clang-tools-extra] [clang-tidy] Handle auto&& in missing-std-forward (PR #220164)

via cfe-commits cfe-commits at lists.llvm.org
Wed Sep 2 20:51:34 PDT 2026


================
@@ -0,0 +1,24 @@
+// RUN: %check_clang_tidy -std=c++20-or-later %s cppcoreguidelines-missing-std-forward %t -- -- -fno-delayed-template-parsing
+
+#include <utility>
+
+void does_not_forward_auto(auto &&t) {
+  // CHECK-MESSAGES: :[[@LINE-1]]:35: warning: forwarding reference parameter 't' is never forwarded inside the function body [cppcoreguidelines-missing-std-forward]
----------------
frank-suwen wrote:

Updated as suggested.

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


More information about the cfe-commits mailing list