It looks like missing [[noreturn]] attributes can cause compiler false positives/other issues; see discussion in #35896 (review). It could be worthwhile warning when they are missing, so they are added.
This produces C++23 related warnings under Clang:
[819/1115] Building CXX object src/test/CMakeFiles/test_bitcoin.dir/threadpool_tests.cpp.o
../src/test/threadpool_tests.cpp:212:64: warning: an attribute specifier sequence in this position is a C++23 extension [-Wc++23-lambda-attributes]
212 | futures.emplace_back(Submit(threadPool, [&make_err, i] [[noreturn]] () {
| ^
1 warning generated.
Related: https://github.com/bitcoin-core/libmultiprocess/pull/339. https://github.com/bitcoin-core/leveldb-subtree/pull/64. https://github.com/arun11299/cpp-subprocess/pull/132.