mirror of
https://github.com/FairRootGroup/FairMQ.git
synced 2026-11-26 05:31:36 +00:00
feat(tidy): add fairmq-bugprone-use-after-send
- Report uses of a MessagePtr after a Send() whose result is discarded. After the send the message is empty with zeromq, and still points to the sent buffer with shmem, so the same code acts differently per transport. - Walk the CFG from the send with ExprSequence, like bugprone-use-after-move. A loop back to the send counts as a use. - Assignment, reset(), Rebuild(), a new declaration in a loop and passing by non-const reference (e.g. to Receive()) give a new message. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -51,6 +51,8 @@ add_library(fairmq-tidy-module OBJECT
|
||||
Transfer.h
|
||||
UncheckedTransferResultCheck.cxx
|
||||
UncheckedTransferResultCheck.h
|
||||
UseAfterSendCheck.cxx
|
||||
UseAfterSendCheck.h
|
||||
)
|
||||
target_compile_features(fairmq-tidy-module PUBLIC cxx_std_17)
|
||||
target_include_directories(fairmq-tidy-module
|
||||
|
||||
Reference in New Issue
Block a user