[clang-tools-extra] [clang-tidy] Fix AllowImplicitlyDeletedCopyOrMove missing-move false positive (PR #207586)

Baranov Victor via cfe-commits cfe-commits at lists.llvm.org
Sun Jul 5 09:34:32 PDT 2026


================
@@ -224,10 +224,19 @@ void SpecialMemberFunctionsCheck::checkForMissingMembers(
                    SpecialMemberFunctionKind::CopyAssignment);
   }
 
+  const bool CopyImplicitlyDeleted =
+      HasImplicitDeletedMember(SpecialMemberFunctionKind::CopyConstructor) &&
+      HasImplicitDeletedMember(SpecialMemberFunctionKind::CopyAssignment);
+  const bool MoveMissing =
+      !HasMember(SpecialMemberFunctionKind::MoveConstructor) &&
+      !HasMember(SpecialMemberFunctionKind::MoveAssignment);
----------------
vbvictor wrote:

Why we use `HasImplicitDeletedMember` for copy but not for move as well?
>From option name `AllowImplicitlyDeletedCopyOrMove` I suspect we should treat both conditions the same way (with same function)

https://github.com/llvm/llvm-project/pull/207586


More information about the cfe-commits mailing list