Merge bitcoin/bitcoin#33445: ci: Update Clang in "tidy" job
5d784bebafclang-tidy: Disable `ArrayBound` check in src/ipc and src/test (Hennadii Stepanov)5efdb0ef30ci: Update Clang in "tidy" job (Hennadii Stepanov) Pull request description: This PR: 1. Updates to [IWYU 0.25](https://github.com/include-what-you-use/include-what-you-use/releases/tag/0.25), which is compatible with Clang 21. 2. Fixes new "modernize-use-default-member-init" warnings. The warning in `interpreter.cpp` is a [false positive](https://github.com/llvm/llvm-project/issues/160394), so it has been suppressed. ACKs for top commit: maflcko: review ACK5d784bebaf🎒 ryanofsky: Code review ACK5d784bebaf, just adding clang version comment since last review. Tree-SHA512: a1d853675ec064170ee0f1cd16be6a900676588d4a1e7b5def8733933b140ba1a9520ec6f6a42bf7638b2ff7cf2fe4d5866d407f68b677b49d2bd68ff345f735
This commit is contained in:
10 files changed
+22
-14
No files matched your search
@@ -8,7 +8,7 @@ export LC_ALL=C.UTF-8
|
|||||||
|
|
||||||
export CI_IMAGE_NAME_TAG="mirror.gcr.io/ubuntu:24.04"
|
export CI_IMAGE_NAME_TAG="mirror.gcr.io/ubuntu:24.04"
|
||||||
export CONTAINER_NAME=ci_native_tidy
|
export CONTAINER_NAME=ci_native_tidy
|
||||||
export TIDY_LLVM_V="20"
|
export TIDY_LLVM_V="21"
|
||||||
export APT_LLVM_V="${TIDY_LLVM_V}"
|
export APT_LLVM_V="${TIDY_LLVM_V}"
|
||||||
export PACKAGES="clang-${TIDY_LLVM_V} libclang-${TIDY_LLVM_V}-dev llvm-${TIDY_LLVM_V}-dev libomp-${TIDY_LLVM_V}-dev clang-tidy-${TIDY_LLVM_V} jq libevent-dev libboost-dev libzmq3-dev systemtap-sdt-dev qt6-base-dev qt6-tools-dev qt6-l10n-tools libqrencode-dev libsqlite3-dev libcapnp-dev capnproto"
|
export PACKAGES="clang-${TIDY_LLVM_V} libclang-${TIDY_LLVM_V}-dev llvm-${TIDY_LLVM_V}-dev libomp-${TIDY_LLVM_V}-dev clang-tidy-${TIDY_LLVM_V} jq libevent-dev libboost-dev libzmq3-dev systemtap-sdt-dev qt6-base-dev qt6-tools-dev qt6-l10n-tools libqrencode-dev libsqlite3-dev libcapnp-dev capnproto"
|
||||||
export NO_DEPENDS=1
|
export NO_DEPENDS=1
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
Checks: '
|
Checks:
|
||||||
-clang-analyzer-core.UndefinedBinaryOperatorResult,
|
# See: https://github.com/capnproto/capnproto/pull/2334.
|
||||||
'
|
- "-clang-analyzer-core.UndefinedBinaryOperatorResult"
|
||||||
|
# See: https://github.com/capnproto/capnproto/pull/2417.
|
||||||
|
- "-clang-analyzer-security.ArrayBound"
|
||||||
@@ -18,10 +18,10 @@ class WalletModel;
|
|||||||
class RecentRequestEntry
|
class RecentRequestEntry
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
RecentRequestEntry() : nVersion(RecentRequestEntry::CURRENT_VERSION) {}
|
RecentRequestEntry() = default;
|
||||||
|
|
||||||
static const int CURRENT_VERSION = 1;
|
static const int CURRENT_VERSION = 1;
|
||||||
int nVersion;
|
int nVersion{RecentRequestEntry::CURRENT_VERSION};
|
||||||
int64_t id{0};
|
int64_t id{0};
|
||||||
QDateTime date;
|
QDateTime date;
|
||||||
SendCoinsRecipient recipient;
|
SendCoinsRecipient recipient;
|
||||||
|
|||||||
@@ -12,9 +12,7 @@
|
|||||||
#include <optional>
|
#include <optional>
|
||||||
|
|
||||||
TransactionFilterProxy::TransactionFilterProxy(QObject* parent)
|
TransactionFilterProxy::TransactionFilterProxy(QObject* parent)
|
||||||
: QSortFilterProxyModel(parent),
|
: QSortFilterProxyModel(parent)
|
||||||
m_search_string(),
|
|
||||||
typeFilter(ALL_TYPES)
|
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -44,7 +44,7 @@ private:
|
|||||||
std::optional<QDateTime> dateFrom;
|
std::optional<QDateTime> dateFrom;
|
||||||
std::optional<QDateTime> dateTo;
|
std::optional<QDateTime> dateTo;
|
||||||
QString m_search_string;
|
QString m_search_string;
|
||||||
quint32 typeFilter;
|
quint32 typeFilter{ALL_TYPES};
|
||||||
CAmount minAmount{0};
|
CAmount minAmount{0};
|
||||||
bool showInactive{true};
|
bool showInactive{true};
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -1254,8 +1254,12 @@ private:
|
|||||||
const CScript& scriptCode; //!< output script being consumed
|
const CScript& scriptCode; //!< output script being consumed
|
||||||
const unsigned int nIn; //!< input index of txTo being signed
|
const unsigned int nIn; //!< input index of txTo being signed
|
||||||
const bool fAnyoneCanPay; //!< whether the hashtype has the SIGHASH_ANYONECANPAY flag set
|
const bool fAnyoneCanPay; //!< whether the hashtype has the SIGHASH_ANYONECANPAY flag set
|
||||||
|
// Temporary workaround for a clang-tidy bug fixed in version 22.
|
||||||
|
// See: https://github.com/llvm/llvm-project/issues/160394.
|
||||||
|
// NOLINTBEGIN(modernize-use-default-member-init)
|
||||||
const bool fHashSingle; //!< whether the hashtype is SIGHASH_SINGLE
|
const bool fHashSingle; //!< whether the hashtype is SIGHASH_SINGLE
|
||||||
const bool fHashNone; //!< whether the hashtype is SIGHASH_NONE
|
const bool fHashNone; //!< whether the hashtype is SIGHASH_NONE
|
||||||
|
// NOLINTEND(modernize-use-default-member-init)
|
||||||
|
|
||||||
public:
|
public:
|
||||||
CTransactionSignatureSerializer(const T& txToIn, const CScript& scriptCodeIn, unsigned int nInIn, int nHashTypeIn) :
|
CTransactionSignatureSerializer(const T& txToIn, const CScript& scriptCodeIn, unsigned int nInIn, int nHashTypeIn) :
|
||||||
|
|||||||
@@ -0,0 +1,3 @@
|
|||||||
|
Checks:
|
||||||
|
# See: https://github.com/capnproto/capnproto/pull/2417.
|
||||||
|
- "-clang-analyzer-security.ArrayBound"
|
||||||
@@ -180,6 +180,8 @@ if(ENABLE_IPC)
|
|||||||
ipc_tests.cpp
|
ipc_tests.cpp
|
||||||
)
|
)
|
||||||
target_link_libraries(test_bitcoin bitcoin_ipc_test bitcoin_ipc)
|
target_link_libraries(test_bitcoin bitcoin_ipc_test bitcoin_ipc)
|
||||||
|
|
||||||
|
configure_file(.clang-tidy.in .clang-tidy USE_SOURCE_PERMISSIONS COPYONLY)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
function(add_boost_test source_file)
|
function(add_boost_test source_file)
|
||||||
|
|||||||
+2
-2
@@ -38,8 +38,8 @@ namespace {
|
|||||||
|
|
||||||
struct CoinEntry {
|
struct CoinEntry {
|
||||||
COutPoint* outpoint;
|
COutPoint* outpoint;
|
||||||
uint8_t key;
|
uint8_t key{DB_COIN};
|
||||||
explicit CoinEntry(const COutPoint* ptr) : outpoint(const_cast<COutPoint*>(ptr)), key(DB_COIN) {}
|
explicit CoinEntry(const COutPoint* ptr) : outpoint(const_cast<COutPoint*>(ptr)) {}
|
||||||
|
|
||||||
SERIALIZE_METHODS(CoinEntry, obj) { READWRITE(obj.key, obj.outpoint->hash, VARINT(obj.outpoint->n)); }
|
SERIALIZE_METHODS(CoinEntry, obj) { READWRITE(obj.key, obj.outpoint->hash, VARINT(obj.outpoint->n)); }
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -21,7 +21,6 @@ class CZMQAbstractNotifier
|
|||||||
public:
|
public:
|
||||||
static const int DEFAULT_ZMQ_SNDHWM {1000};
|
static const int DEFAULT_ZMQ_SNDHWM {1000};
|
||||||
|
|
||||||
CZMQAbstractNotifier() : outbound_message_high_water_mark(DEFAULT_ZMQ_SNDHWM) {}
|
|
||||||
virtual ~CZMQAbstractNotifier();
|
virtual ~CZMQAbstractNotifier();
|
||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
@@ -61,7 +60,7 @@ protected:
|
|||||||
void* psocket{nullptr};
|
void* psocket{nullptr};
|
||||||
std::string type;
|
std::string type;
|
||||||
std::string address;
|
std::string address;
|
||||||
int outbound_message_high_water_mark; // aka SNDHWM
|
int outbound_message_high_water_mark{DEFAULT_ZMQ_SNDHWM}; // aka SNDHWM
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // BITCOIN_ZMQ_ZMQABSTRACTNOTIFIER_H
|
#endif // BITCOIN_ZMQ_ZMQABSTRACTNOTIFIER_H
|
||||||
Reference in new issue
Block a user