Skip to content

Commit 47c86a0

Browse files
author
MacroFake
committed
Merge bitcoin#25466: ci: add unused-using-decls to clang-tidy
a02f3f1 tidy: use misc-unused-using-decls (fanquake) d6787bc refactor: remove unused using directives (fanquake) 3617634 validation: remove unused using directives (eugene) Pull request description: Adds https://clang.llvm.org/extra/clang-tidy/checks/misc/unused-using-decls.html to our clang-tidy. PR'd after the discussion in bitcoin#25433 (which it includes). ACKs for top commit: jamesob: Github ACK bitcoin@a02f3f1 Tree-SHA512: 2bb937c1cc90006e69054458d845fb54f287567f4309c773a3fc859f260558c32ff51fc1c2ce9b43207426f3547e7ce226c87186103d741d5efcca19cd355253
2 parents 2bdce7f + a02f3f1 commit 47c86a0

File tree

11 files changed

+4
-22
lines changed

11 files changed

+4
-22
lines changed

src/.clang-tidy

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
11
Checks: '
22
-*,
33
bugprone-argument-comment,
4+
misc-unused-using-decls,
45
modernize-use-default-member-init,
56
modernize-use-nullptr,
67
readability-redundant-declaration,
78
'
89
WarningsAsErrors: '
910
bugprone-argument-comment,
11+
misc-unused-using-decls,
1012
modernize-use-default-member-init,
1113
modernize-use-nullptr,
1214
readability-redundant-declaration,

src/bench/wallet_loading.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,6 @@
1919
using wallet::CWallet;
2020
using wallet::DatabaseFormat;
2121
using wallet::DatabaseOptions;
22-
using wallet::ISMINE_SPENDABLE;
23-
using wallet::MakeWalletDatabase;
2422
using wallet::TxStateInactive;
2523
using wallet::WALLET_FLAG_DESCRIPTORS;
2624
using wallet::WalletContext;

src/init.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,6 @@ using node::CacheSizes;
110110
using node::CalculateCacheSizes;
111111
using node::ChainstateLoadVerifyError;
112112
using node::ChainstateLoadingError;
113-
using node::CleanupBlockRevFiles;
114113
using node::DEFAULT_PERSIST_MEMPOOL;
115114
using node::DEFAULT_PRINTPRIORITY;
116115
using node::DEFAULT_STOPAFTERBLOCKIMPORT;

src/qt/bitcoin.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,6 @@ Q_DECLARE_METATYPE(CAmount)
7777
Q_DECLARE_METATYPE(SynchronizationState)
7878
Q_DECLARE_METATYPE(uint256)
7979

80-
using node::NodeContext;
81-
8280
static void RegisterMetaTypes()
8381
{
8482
// Register meta types used for QMetaObject::invokeMethod and Qt::QueuedConnection

src/qt/test/test_main.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,6 @@ Q_IMPORT_PLUGIN(QAndroidPlatformIntegrationPlugin)
4343
#endif
4444
#endif
4545

46-
using node::NodeContext;
47-
4846
const std::function<void(const std::string&)> G_TEST_LOG_FUN{};
4947

5048
const std::function<std::vector<const char*>()> G_TEST_COMMAND_LINE_ARGUMENTS{};

src/rpc/mempool.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ using kernel::DumpMempool;
2525

2626
using node::DEFAULT_MAX_RAW_TX_FEE_RATE;
2727
using node::MempoolPath;
28-
using node::ShouldPersistMempool;
2928
using node::NodeContext;
3029

3130
static RPCHelpMan sendrawtransaction()

src/rpc/output_script.cpp

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,6 @@
2626
#include <tuple>
2727
#include <vector>
2828

29-
namespace node {
30-
struct NodeContext;
31-
}
32-
using node::NodeContext;
33-
3429
static RPCHelpMan validateaddress()
3530
{
3631
return RPCHelpMan{

src/rpc/rawtransaction.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,12 +46,10 @@
4646
#include <univalue.h>
4747

4848
using node::AnalyzePSBT;
49-
using node::BroadcastTransaction;
5049
using node::FindCoins;
5150
using node::GetTransaction;
5251
using node::NodeContext;
5352
using node::PSBTAnalysis;
54-
using node::ReadBlockFromDisk;
5553

5654
static void TxToJSON(const CTransaction& tx, const uint256 hashBlock, UniValue& entry, CChainState& active_chainstate)
5755
{

src/test/coinstatsindex_tests.cpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,6 @@
1313

1414
#include <chrono>
1515

16-
using kernel::CCoinsStats;
17-
using kernel::CoinStatsHashType;
18-
1916
BOOST_AUTO_TEST_SUITE(coinstatsindex_tests)
2017

2118
static void IndexWaitSynced(BaseIndex& index)

src/test/miniscript_tests.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,8 @@ struct KeyConverter {
120120
//! Singleton instance of KeyConverter.
121121
const KeyConverter CONVERTER{};
122122

123+
// https://github.com/llvm/llvm-project/issues/53444
124+
// NOLINTNEXTLINE(misc-unused-using-decls)
123125
using miniscript::operator"" _mst;
124126

125127
enum TestMode : int {

0 commit comments

Comments
 (0)