clang-tidy: Disable `UndefinedBinaryOperatorResult` check in `src/ipc` #33312

pull hebasto wants to merge 1 commits into bitcoin:master from hebasto:250904-capnp-tidy changing 2 files +5 −0
  1. hebasto commented at 10:09 PM on September 4, 2025: member

    The warnings are false positive and have been fixed upstream. See: https://github.com/capnproto/capnproto/pull/2334.

    This PR:

    1. Disables the UndefinedBinaryOperatorResult clang-tidy check for source files generated by the mpgen tool.

    2. Is an alternative to the draft #33281.

    3. Fixes #33256.

  2. clang-tidy: Disable `UndefinedBinaryOperatorResult` check in `src/ipc`
    The warnings are false positive and have been fixed upstream.
    See: https://github.com/capnproto/capnproto/pull/2334.
    
    This change disables the `UndefinedBinaryOperatorResult` clang-tidy
    check for source files generated by the `mpgen` tool.
    589b65f06c
  3. hebasto added this to the milestone 30.0 on Sep 4, 2025
  4. DrahtBot commented at 10:09 PM on September 4, 2025: contributor

    <!--e57a25ab6845829454e8d69fc972939a-->

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

    <!--006a51241073e994b41acfe9ec718e94-->

    Code Coverage & Benchmarks

    For details see: https://corecheck.dev/bitcoin/bitcoin/pulls/33312.

    <!--021abf342d371248e50ceaed478a90ca-->

    Reviews

    See the guideline for information on the review process.

    Type Reviewers
    ACK Sjors, fjahr, ryanofsky, achow101

    If your review is incorrectly listed, please react with 👎 to this comment and the bot will ignore it on the next update.

    <!--5faf32d7da4f0f540f40219e4f7537a3-->

  5. Sjors commented at 6:47 AM on September 8, 2025: member

    ACK 589b65f06c3376df4cde3fac5c1d39a2d3254920

    Is it possible to move this into the capnp subdirectory to further narrow the scope of this exception?

  6. hebasto commented at 9:08 AM on September 8, 2025: member

    Is it possible to move this into the capnp subdirectory to further narrow the scope of this exception?

    The most recent CI log shows false-positive clang-analyzer-core.UndefinedBinaryOperatorResult warnings in the following files:

    • /home/admin/actions-runner/_work/_temp/build/src/ipc/capnp/init.capnp.proxy-server.c++
    • /home/admin/actions-runner/_work/_temp/build/src/ipc/capnp/echo.capnp.proxy-server.c++
    • /home/admin/actions-runner/_work/_temp/build/src/ipc/capnp/mining.capnp.proxy-server.c++
    • /home/admin/actions-runner/_work/_temp/build/src/ipc/libmultiprocess/test/mp/test/foo.capnp.proxy-server.c++

    The last file is clearly outside of the src/ipc/capnp directory.

    Also note that the scope of the new .clang-tidy file is limited to generated files only.

  7. fjahr commented at 3:01 PM on September 8, 2025: contributor

    ACK 589b65f06c3376df4cde3fac5c1d39a2d3254920

    Looks cleaner than the alternative #33281 with the limited scope.

    Does it actually make sense at all to run clang-tidy on files that are auto generated by an upstream library? I guess that discussion is out of the scope for this PR/v30 but I am wondering what the upside of that is...

  8. ryanofsky approved
  9. ryanofsky commented at 4:27 PM on September 8, 2025: contributor

    Code review ACK 589b65f06c3376df4cde3fac5c1d39a2d3254920. Thanks for the fix!

    It could make sense to make a similar change in the libmultiprocess repository, so the src/ipc/libmultiprocess/ directory would be covered and this fix could be moved to src/ipc/capnp/ instead of src/ipc/, but current approach seems simpler and in the long run when https://github.com/capnproto/capnproto/pull/2334 rolls out, or the LLVM isInMainFile check works better, this can be dropped.

    Not running clang-tidy on generated files is another possible fix, but IMO it is good to fix tidy and analyzer errors even in generated files, and so far we've been able to do that without too much trouble. This error doesn't even really come from a generated file, it comes from a header file included by generated files.

  10. achow101 commented at 8:27 PM on September 8, 2025: member

    ACK 589b65f06c3376df4cde3fac5c1d39a2d3254920

  11. achow101 merged this on Sep 8, 2025
  12. achow101 closed this on Sep 8, 2025

  13. hebasto deleted the branch on Sep 8, 2025
  14. alexanderwiederin referenced this in commit 49e068b15b on Sep 16, 2025
  15. alexanderwiederin referenced this in commit 4b0c2f2a8f on Sep 17, 2025
  16. alexanderwiederin referenced this in commit 2edb618ffe on Sep 17, 2025
  17. stringintech referenced this in commit fb8510ba20 on Sep 17, 2025
  18. bug-castercv502 referenced this in commit 9f5d12d027 on Sep 28, 2025
  19. yuvicc referenced this in commit d89c6d0002 on Sep 28, 2025
  20. stickies-v referenced this in commit a785fe6759 on Nov 5, 2025
  21. kwvg referenced this in commit 4a6de56003 on Jan 23, 2026
  22. PastaPastaPasta referenced this in commit 1ea35a436d on Jan 24, 2026
  23. Kino1994 referenced this in commit 965d566e98 on Jun 28, 2026
  24. BigcoinBGC referenced this in commit 9d70202e58 on Jun 30, 2026
  25. Kino1994 referenced this in commit c05f4bdf51 on Aug 19, 2026
  26. bitcoin locked this on Sep 8, 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-09-09 07:56 UTC