This way we will not forget to remove using statements after we stop using the object.
This is a backport of core#25466
Differential D18663
ci: add unused-using-decls to clang-tidy Authored by PiRK on Sep 22 2025, 13:41. Tags None Subscribers None
Details
This way we will not forget to remove using statements after we stop using the object. This is a backport of core#25466 cmake .. -GNinja -DBUILD_CHRONIK=1 -DENABLE_CLANG_TIDY=ON -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ ninja all check bitcoin-fuzzers bitcoin-bench
Diff Detail
Event TimelineComment Actions Build Bitcoin ABC Diffs / Diff Testing (build-clang-tidy) failed.
Tail of the build log: ^
/work/src/test/util/setup_common.cpp:69:13: note: remove the using
using node::fReindex;
~~~~~~~~~~~~^~~~~~~~~
2196 warnings generated.
Suppressed 2195 warnings (2195 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
1 warning treated as error
[418/584] Building CXX object src/wallet/CMakeFiles/wallet.dir/coincontrol.cpp.o
[419/584] Building CXX object src/wallet/CMakeFiles/wallet.dir/crypter.cpp.o
[420/584] Building CXX object src/wallet/CMakeFiles/wallet.dir/coinselection.cpp.o
[421/584] Building CXX object src/wallet/CMakeFiles/wallet.dir/db.cpp.o
[422/584] Building CXX object src/wallet/CMakeFiles/wallet.dir/bdb.cpp.o
[423/584] Building CXX object src/test/CMakeFiles/testutil.dir/util/mining.cpp.o
[424/584] Building CXX object src/test/CMakeFiles/testutil.dir/util/txmempool.cpp.o
[425/584] Building CXX object src/test/CMakeFiles/testutil.dir/util/validation.cpp.o
[426/584] Building CXX object src/test/CMakeFiles/testutil.dir/util/wallet.cpp.o
[427/584] Building CXX object src/wallet/CMakeFiles/wallet.dir/fees.cpp.o
[428/584] Building CXX object src/wallet/CMakeFiles/wallet.dir/spend.cpp.o
FAILED: src/wallet/CMakeFiles/wallet.dir/spend.cpp.o
/usr/bin/cmake -E __run_co_compile --launcher=/usr/bin/ccache --tidy="/usr/bin/clang-tidy-16;-warnings-as-errors=*;--extra-arg-before=--driver-mode=g++" --source=/work/src/wallet/spend.cpp -- /usr/bin/clang++ -DBOOST_ALL_NO_LIB -DBOOST_NO_CXX98_FUNCTION_BASE -DBUILD_BITCOIN_INTERNAL -DENABLE_AVX2 -DENABLE_SHANI -DENABLE_SSE41 -DHAVE_BUILD_INFO -DHAVE_CONFIG_H -DHAVE_CONSENSUS_LIB -DLEVELDB_ATOMIC_PRESENT -DLEVELDB_PLATFORM_POSIX -DOS_LINUX -I/work/src/. -I/work/abc-ci-builds/build-clang-tidy/src -I/work/src/univalue/include -I/work/abc-ci-builds/build-clang-tidy/src/crypto/.. -I/work/src/secp256k1/include -I/work/src/leveldb/include -isystem /usr/include/jemalloc -isystem /usr/include/miniupnpc -g -O2 -fPIC -fvisibility=hidden -fstack-protector-all -Wstack-protector -fcf-protection=full -fstack-clash-protection -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -Wall -Wextra -Wformat -Wgnu -Wvla -Wcast-align -Wunused-parameter -Wmissing-braces -Wthread-safety -Wrange-loop-analysis -Wredundant-decls -Wunreachable-code-loop-increment -Wsign-compare -Wconditional-uninitialized -Wdocumentation -Wformat-security -Wredundant-move -Woverloaded-virtual -Wshadow -Wshadow-field -Wno-unused-parameter -Wno-implicit-fallthrough -Wno-psabi -std=gnu++17 -MD -MT src/wallet/CMakeFiles/wallet.dir/spend.cpp.o -MF src/wallet/CMakeFiles/wallet.dir/spend.cpp.o.d -o src/wallet/CMakeFiles/wallet.dir/spend.cpp.o -c /work/src/wallet/spend.cpp
/work/src/wallet/spend.cpp:22:19: error: using decl 'FoundBlock' is unused [misc-unused-using-decls,-warnings-as-errors]
using interfaces::FoundBlock;
^
/work/src/wallet/spend.cpp:22:19: note: remove the using
using interfaces::FoundBlock;
~~~~~~~~~~~~~~~~~~^~~~~~~~~~~
2336 warnings generated.
Suppressed 2335 warnings (2335 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
1 warning treated as error
[429/584] Building CXX object src/CMakeFiles/server.dir/validation.cpp.o
[430/584] Building CXX object src/wallet/CMakeFiles/wallet.dir/sqlite.cpp.o
[431/584] Building CXX object src/wallet/CMakeFiles/wallet.dir/load.cpp.o
[432/584] Building CXX object src/wallet/CMakeFiles/wallet.dir/receive.cpp.o
[433/584] Linking CXX static library src/zmq/libzmq.a
[434/584] Building CXX object src/wallet/CMakeFiles/wallet.dir/rpc/util.cpp.o
[435/584] Building CXX object src/wallet/CMakeFiles/wallet.dir/rpc/signmessage.cpp.o
[436/584] Building CXX object src/wallet/CMakeFiles/wallet.dir/transaction.cpp.o
[437/584] Building CXX object src/seeder/CMakeFiles/seeder-base.dir/dns.cpp.o
[438/584] Building CXX object src/wallet/CMakeFiles/wallet.dir/rpc/encrypt.cpp.o
[439/584] Building CXX object src/wallet/CMakeFiles/wallet.dir/walletutil.cpp.o
[440/584] Building CXX object src/wallet/CMakeFiles/wallet.dir/interfaces.cpp.o
[441/584] Building CXX object src/wallet/CMakeFiles/wallet.dir/salvage.cpp.o
[442/584] Building CXX object src/seeder/CMakeFiles/seeder-base.dir/db.cpp.o
[443/584] Building CXX object src/seeder/CMakeFiles/seeder-base.dir/options.cpp.o
[444/584] Building CXX object src/iguana/CMakeFiles/iguana.dir/iguana_formatter.cpp.o
[445/584] Building CXX object src/iguana/CMakeFiles/iguana.dir/iguana_interpreter.cpp.o
[446/584] Building CXX object src/iguana/CMakeFiles/iguana.dir/iguana.cpp.o
[447/584] Linking CXX executable src/iguana/iguana
[448/584] Building CXX object src/wallet/CMakeFiles/wallet.dir/scriptpubkeyman.cpp.o
[449/584] Building CXX object src/seeder/CMakeFiles/bitcoin-seeder.dir/main.cpp.o
[450/584] Building CXX object src/wallet/CMakeFiles/wallet-tool.dir/wallettool.cpp.o
[451/584] Building CXX object src/wallet/CMakeFiles/wallet.dir/rpc/backup.cpp.o
[452/584] Building CXX object src/seeder/CMakeFiles/seeder-base.dir/bitcoin.cpp.o
[453/584] Building CXX object src/wallet/CMakeFiles/wallet.dir/walletdb.cpp.o
[454/584] Building CXX object src/wallet/CMakeFiles/wallet.dir/rpcwallet.cpp.o
[455/584] Building CXX object src/wallet/CMakeFiles/wallet.dir/wallet.cpp.o
ninja: build stopped: cannot make progress due to previous errors.
Build build-clang-tidy failed with exit code 1 |