Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

5chmidti
Copy link
Contributor

@5chmidti 5chmidti commented Aug 31, 2024

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.

Since llvm#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.
@llvmbot
Copy link
Member

llvmbot commented Aug 31, 2024

@llvm/pr-subscribers-clang-tidy

@llvm/pr-subscribers-clang-tools-extra

Author: Julian Schmidt (5chmidti)

Changes

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.


Full diff: https://github.com/llvm/llvm-project/pull/106861.diff

1 Files Affected:

  • (modified) clang-tools-extra/test/clang-tidy/checkers/cppcoreguidelines/missing-std-forward.cpp (+3-3)
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

@5chmidti 5chmidti merged commit 2f321fa into llvm:main Sep 11, 2024
11 checks passed
@5chmidti 5chmidti deleted the clang_tidy_missing_std_forward_deleted_functions branch September 11, 2024 16:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants