[clang-tools-extra] [NFC][clang-tidy] fix tests of deleted functions for missing-std-forward (PR #106861)
via cfe-commits
cfe-commits at lists.llvm.org
Sat Aug 31 09:36:19 PDT 2024
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-clang-tools-extra
Author: Julian Schmidt (5chmidti)
<details>
<summary>Changes</summary>
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
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
``````````
</details>
https://github.com/llvm/llvm-project/pull/106861
More information about the cfe-commits
mailing list