Skip to content

fix(clang-tidy): justify intentional integer-to-pointer casts - #1235

Merged
castler merged 1 commit into
eclipse-score:mainfrom
castler:fix_performance_no_int_to_ptr
Oct 2, 2026
Merged

castler merged 1 commit into
eclipse-score:mainfrom
castler:fix_performance_no_int_to_ptr

Conversation

@castler

@castler castler commented Oct 1, 2026

Copy link
Copy Markdown
Contributor

Summary

Suppresses the 2 performance-no-int-to-ptr findings in new_delete_delegate_resource.cpp. NewDeleteDelegateMemoryResource holds no real memory and intentionally reports a made-up base (one page) and end (max uintptr_t) address that are never dereferenced, so the integer-to-pointer cast is inherent. The existing NOLINTBEGIN/END for reinterpret_cast is extended and its justification updated.

Verification

  • clang-tidy: no remaining findings for this check
  • bazel test //score/memory/... passes

Suppress the 2 performance-no-int-to-ptr findings in
NewDeleteDelegateMemoryResource. The resource owns no real memory and
deliberately reports made-up base/end addresses; the pointers are never
dereferenced, so the cast cannot be avoided. Extends the existing
reinterpret-cast suppression and its justification.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@castler
castler marked this pull request as ready for review October 2, 2026 05:29
@castler
castler enabled auto-merge October 2, 2026 06:49
@castler
castler added this pull request to the merge queue Oct 2, 2026
Merged via the queue into eclipse-score:main with commit 196ca45 Oct 2, 2026
16 checks passed
@castler
castler deleted the fix_performance_no_int_to_ptr branch October 2, 2026 07:29
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