refactor: Enable more tidy bugprone checks #36588

pull maflcko wants to merge 5 commits into bitcoin:master from maflcko:2610-tidy-bugprone changing 5 files +22 −7
  1. maflcko commented at 9:57 AM on October 21, 2026: member

    Enable some bugprone clang-tidy checks, which seem useful.

    Apart from a test-only bug, they didn't find anything severe, but I think it still makes sense to enable them, so that it is easier to read the resulting code. Also, it is trivial to disable them, if they turn out annoying.

  2. DrahtBot renamed this:
    refactor: Enable more tidy bugprone checks
    refactor: Enable more tidy bugprone checks
    on Oct 21, 2026
  3. DrahtBot added the label Refactoring on Oct 21, 2026
  4. DrahtBot commented at 9:57 AM on October 21, 2026: contributor

    <!--e57a25ab6845829454e8d69fc972939a-->

    The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

    <!--006a51241073e994b41acfe9ec718e94-->

    External sites

    <!--021abf342d371248e50ceaed478a90ca-->

    Reviews

    See the guideline and AI policy for information on the review process.

    Type Reviewers
    Concept ACK hebasto

    If your review is incorrectly listed, please copy-paste <code>&lt;!--meta-tag:bot-skip--&gt;</code> into the comment that the bot should ignore.

    <!--5faf32d7da4f0f540f40219e4f7537a3-->

  5. DrahtBot added the label CI failed on Oct 21, 2026
  6. DrahtBot commented at 10:50 AM on October 21, 2026: contributor

    <!--85328a0da195eb286784d51f73fa0af9-->

    🚧 At least one of the CI tasks failed. <sub>Task tidy: https://github.com/bitcoin/bitcoin/actions/runs/39580996840/job/119158281831</sub> <sub>LLM reason (✨ experimental): The build failed because Clang treated the unused copy_target variable in util_not_null_tests.cpp as an error (-Werror).</sub>

    <details><summary>Hints</summary>

    Try to run the tests locally, according to the documentation. However, a CI failure may still happen due to a number of reasons, for example:

    • Possibly due to a silent merge conflict (the changes in this pull request being incompatible with the current code in the target branch). If so, make sure to rebase on the latest commit of the target branch.

    • A sanitizer issue, which can only be found by compiling with the sanitizer and running the affected test.

    • An intermittent issue.

    Leave a comment here, if you need help tracking down a confusing failure.

    </details>

  7. maflcko force-pushed on Oct 21, 2026
  8. hebasto commented at 10:55 AM on October 21, 2026: member

    Enable some bugprone clang-tidy checks...

    Concept ACK.

  9. maflcko force-pushed on Oct 21, 2026
  10. DrahtBot removed the label CI failed on Oct 21, 2026
  11. refactor: Enable bugprone-unused-raii
    The code change does not change any behavior, because the name is not
    used in the compile-time context.
    fab3062590
  12. refactor: Enable bugprone-string-literal-with-embedded-nul
    Also, fix a test bug.
    fa8c949e4c
  13. refactor: Enable bugprone-inaccurate-erase
    Also, instead of using the erase-remove idiom consistenly, just use the
    C++20 std::erase here.
    
    Note: Wallets are unique, so the code change does not change any
    behavior.
    fa077e9f79
  14. refactor: Enable some useful bugprone checks, which are clean right now
    Also, sort
    fa3384c36a
  15. refactor: Enable bugprone-return-const-ref-from-parameter to find missing LIFETIMEBOUND annotations
    Whenever the check fires, a missing LIFETIMEBOUND should be added.
    fa60b2ae8d
  16. maflcko force-pushed on Oct 21, 2026

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-10-21 18:51 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me