[clang-tools-extra] 3eeca52 - Fix wrong signature for std::move and std::swap in test.
Richard Smith via cfe-commits
cfe-commits at lists.llvm.org
Sun Apr 17 19:25:30 PDT 2022
Author: Richard Smith
Date: 2022-04-17T19:25:20-07:00
New Revision: 3eeca524569744d2927fd13304ab5abb7217e108
URL: https://github.com/llvm/llvm-project/commit/3eeca524569744d2927fd13304ab5abb7217e108
DIFF: https://github.com/llvm/llvm-project/commit/3eeca524569744d2927fd13304ab5abb7217e108.diff
LOG: Fix wrong signature for std::move and std::swap in test.
Added:
Modified:
clang-tools-extra/test/clang-tidy/checkers/bugprone-unhandled-self-assignment.cpp
Removed:
################################################################################
diff --git a/clang-tools-extra/test/clang-tidy/checkers/bugprone-unhandled-self-assignment.cpp b/clang-tools-extra/test/clang-tidy/checkers/bugprone-unhandled-self-assignment.cpp
index fb7c089ae8cd6..14d27855d7c5a 100644
--- a/clang-tools-extra/test/clang-tidy/checkers/bugprone-unhandled-self-assignment.cpp
+++ b/clang-tools-extra/test/clang-tidy/checkers/bugprone-unhandled-self-assignment.cpp
@@ -3,11 +3,11 @@
namespace std {
template <class T>
-void swap(T x, T y) {
+void swap(T &x, T &y) {
}
template <class T>
-T &&move(T x) {
+T &&move(T &x) {
}
template <class T>
@@ -403,7 +403,7 @@ class CopyAndMove1 {
class CopyAndMove2 {
public:
CopyAndMove2 &operator=(const CopyAndMove2 &object) {
- *this = std::move(CopyAndMove2(object));
+ *this = CopyAndMove2(object);
return *this;
}
More information about the cfe-commits
mailing list