Skip to content

fix(clang-tidy): declare copy/move members explicitly (RULE-4-1-2) - #1353

Merged
limdor merged 1 commit into
eclipse-score:mainfrom
castler:fix_implicit_copy
Oct 16, 2026
Merged

limdor merged 1 commit into
eclipse-score:mainfrom
castler:fix_implicit_copy

Conversation

@castler

@castler castler commented Oct 9, 2026

Copy link
Copy Markdown
Contributor

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=ci build of //score/...; //score/message_passing/... and //score/mw/com/impl/... tests pass.

… 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
castler marked this pull request as ready for review October 16, 2026 05:53
@limdor
limdor added this pull request to the merge queue Oct 16, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Oct 16, 2026
@castler
castler added this pull request to the merge queue Oct 16, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Oct 16, 2026
@castler
castler added this pull request to the merge queue Oct 16, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Oct 16, 2026
@limdor
limdor added this pull request to the merge queue Oct 16, 2026
Merged via the queue into eclipse-score:main with commit 22e64d5 Oct 16, 2026
18 checks passed
@limdor
limdor deleted the fix_implicit_copy branch October 16, 2026 07:24
@github-project-automation github-project-automation Bot moved this from Backlog to Done in COM - Communication FT Oct 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants