This is a backport of core#19077 [17/26]
https://github.com/bitcoin/bitcoin/pull/19077/commits/6045f77003f167bee9a85e2d53f8fc6ff2e297d8
Depends on D10564
With clang-tidy:
ninja