Repository navigation
fix(clang-tidy): declare copy/move members explicitly (RULE-4-1-2) - #1353
Merged
Merged
Conversation
… with a destructor A user-declared destructor makes the implicit copy constructor and copy assignment operator deprecated (MISRA C++ RULE-4-1-2). Declare them explicitly: default them for the polymorphic interfaces ProxyMethodBinding and IOfferedState, and delete them for the unix domain server, its connection and the two unix domain factories, which own non-copyable resources and are never copied. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
castler
marked this pull request as ready for review
October 16, 2026 05:53
castler
requested review from
LittleHuba,
bemerybmw,
crimson11,
hoe-jo and
limdor
as code owners
October 16, 2026 05:53
limdor
approved these changes
Oct 16, 2026
github-merge-queue
Bot
removed this pull request from the merge queue due to failed status checks
Oct 16, 2026
github-merge-queue
Bot
removed this pull request from the merge queue due to failed status checks
Oct 16, 2026
github-merge-queue
Bot
removed this pull request from the merge queue due to failed status checks
Oct 16, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes the genuine CodeQL MISRA C++ RULE-4-1-2 (
implicit-declaration-of-copy-constructor) findings: classes with a user-declared destructor relied on the deprecated implicit copy members.ProxyMethodBinding,IOfferedState(polymorphic interfaces): copy/move explicitly defaulted, like the other interfaces.UnixDomainServer,UnixDomainServer::ServerConnection,UnixDomainServerFactory,UnixDomainClientFactory: copy/move deleted. They own non-copyable resources, were not movable before (user-declared destructor suppressed the implicit move), and are not copied.The other findings of this rule are false positives on explicitly defaulted copy members and are addressed in the CodeQL query.
Validated:
--config=cibuild of//score/...;//score/message_passing/...and//score/mw/com/impl/...tests pass.