[clang-tools-extra] 2f321fa - [NFC][clang-tidy] fix tests of deleted functions for missing-std-forward (#106861)

via cfe-commits cfe-commits at lists.llvm.org
Wed Sep 11 09:52:44 PDT 2024


Author: Julian Schmidt
Date: 2024-09-11T18:52:41+02:00
New Revision: 2f321fac722e6c7913825f003c194b923d027354

URL: https://github.com/llvm/llvm-project/commit/2f321fac722e6c7913825f003c194b923d027354
DIFF: https://github.com/llvm/llvm-project/commit/2f321fac722e6c7913825f003c194b923d027354.diff

LOG: [NFC][clang-tidy] fix tests of deleted functions for missing-std-forward (#106861)

Since #87832, unnamed identifiers are excluded from being diagnosed. As
a result, the tests that were supposed to test that deleted functions
are correctly ignored, are ignored because of the unnamed identifiers
instead of the deleted function. This change simply introduces names for
the parameters of the deleted functions.

Added: 
    

Modified: 
    clang-tools-extra/test/clang-tidy/checkers/cppcoreguidelines/missing-std-forward.cpp

Removed: 
    


################################################################################
diff  --git a/clang-tools-extra/test/clang-tidy/checkers/cppcoreguidelines/missing-std-forward.cpp b/clang-tools-extra/test/clang-tidy/checkers/cppcoreguidelines/missing-std-forward.cpp
index 8116db58c937d4..98c592db7ce226 100644
--- a/clang-tools-extra/test/clang-tidy/checkers/cppcoreguidelines/missing-std-forward.cpp
+++ b/clang-tools-extra/test/clang-tidy/checkers/cppcoreguidelines/missing-std-forward.cpp
@@ -187,14 +187,14 @@ void lambda_value_reference_auxiliary_var(T&& t) {
 namespace deleted_functions {
 
 template <typename T>
-void f(T &&) = delete;
+void f(T &&t) = delete;
 
 struct S {
     template <typename T>
-    S(T &&) = delete;
+    S(T &&t) = delete;
 
     template <typename T>
-    void operator&(T &&) = delete;
+    void operator&(T &&t) = delete;
 };
 
 } // namespace deleted_functions


        


More information about the cfe-commits mailing list