[clang-tools-extra] [clang-tidy] Make `bugprone-unhandled-self-assignment` check more general (PR #147066)
Baranov Victor via cfe-commits
cfe-commits at lists.llvm.org
Sat Jul 19 14:51:00 PDT 2025
================
@@ -540,6 +547,89 @@ class NotACopyAssignmentOperator {
Uy *getUy() const { return Ptr2; }
};
+// Support "extended" copy/move constructors
+class AllocatorAwareClass {
----------------
vbvictor wrote:
Could you add cases when the check will fire (I suppose it at least):
- when the user did `swap(tmp, *this);`
- when user forgot to place `swap` at all.
- when user created `tmp` variable and did `swap`, but `tmp` variable had a wrong type.
https://github.com/llvm/llvm-project/pull/147066
More information about the cfe-commits
mailing list