feat(tidy): add fairmq-bugprone-run-loop-ignores-state

- Report endless loops (while (true), for (;;), ...) in an override of
  Device::Run() that do not call NewStatePending() or WaitFor(). Such a
  device does not stop when a state change is requested.
- Skip loops that call Send() or Receive(), which an interrupt stops,
  and loops with a break, return, throw or goto.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Claude
2026-11-09 23:14:01 +00:00
parent 42952bfa42
commit 349573fb5f
6 changed files with 176 additions and 0 deletions

View File

@@ -49,6 +49,8 @@ add_library(fairmq-tidy-module OBJECT
ProgOptionsAccessorsCheck.h
RunDeviceCheck.cxx
RunDeviceCheck.h
RunLoopIgnoresStateCheck.cxx
RunLoopIgnoresStateCheck.h
Transfer.cxx
Transfer.h
TransferCodeCheck.cxx