The warnings are false positive and have been fixed upstream. See: https://github.com/capnproto/capnproto/pull/2334.
This PR:
UndefinedBinaryOperatorResult
check in src/ipc
#33312
The warnings are false positive and have been fixed upstream. See: https://github.com/capnproto/capnproto/pull/2334.
This PR:
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.
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.
For details see: https://corecheck.dev/bitcoin/bitcoin/pulls/33312.
See the guideline for information on the review process.
If your review is incorrectly listed, please react with 👎 to this comment and the bot will ignore it on the next update.
ACK 589b65f06c3376df4cde3fac5c1d39a2d3254920
Is it possible to move this into the capnp subdirectory to further narrow the scope of this exception?
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.
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…
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.