Skip to content

Commit 17a0403

Browse files
committed
Merge bitcoin#34662: ci: use LLVM/Clang 22 in tidy job
5e35a90 interpreter: remove clang-tidy suppression (fanquake) 4089682 ci: use Clang 22 in tidy task (fanquake) 7ea076f tidy: remove deprecated header (fanquake) eb17f29 tidy: clang-tidy is required (fanquake) Pull request description: Changes needed for moving to Clang 22 in the tidy job. ACKs for top commit: maflcko: lgtm ACK 5e35a90 hebasto: ACK 5e35a90, I have reviewed the code and it looks OK. Tree-SHA512: 9ca6e841f7480b8abd78d5621d08a5bf80c2ff4facd7a0d76038ac1771bbf3d37dc2df19fa27583679177e4618db6294e2f2bb2129d9c25a53338b49ed71aac2
2 parents bf9ef4f + 5e35a90 commit 17a0403

File tree

5 files changed

+3
-8
lines changed

5 files changed

+3
-8
lines changed

ci/test/00_setup_env_native_tidy.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ export LC_ALL=C.UTF-8
88

99
export CI_IMAGE_NAME_TAG="mirror.gcr.io/ubuntu:24.04"
1010
export CONTAINER_NAME=ci_native_tidy
11-
export TIDY_LLVM_V="21"
11+
export TIDY_LLVM_V="22"
1212
export APT_LLVM_V="${TIDY_LLVM_V}"
1313
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"
1414
export NO_DEPENDS=1

ci/test/03_test_script.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ if [ "${RUN_TIDY}" = "true" ]; then
174174
mv tmp.json "${BASE_BUILD_DIR}/compile_commands.json"
175175

176176
cd "${BASE_BUILD_DIR}/src/"
177-
if ! ( run-clang-tidy-"${TIDY_LLVM_V}" -quiet -load="/tidy-build/libbitcoin-tidy.so" "${MAKEJOBS}" | tee tmp.tidy-out.txt ); then
177+
if ! ( run-clang-tidy-"${TIDY_LLVM_V}" -config-file="${BASE_ROOT_DIR}/src/.clang-tidy" -quiet -load="/tidy-build/libbitcoin-tidy.so" "${MAKEJOBS}" | tee tmp.tidy-out.txt ); then
178178
grep -C5 "error: " tmp.tidy-out.txt
179179
echo "^^^ ⚠️ Failure generated from clang-tidy"
180180
false

contrib/devtools/bitcoin-tidy/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ set(CMAKE_DISABLE_FIND_PACKAGE_ZLIB ON)
2121
set(CMAKE_DISABLE_FIND_PACKAGE_zstd ON)
2222

2323
find_package(LLVM REQUIRED CONFIG)
24-
find_program(CLANG_TIDY_EXE NAMES "clang-tidy-${LLVM_VERSION_MAJOR}" "clang-tidy" HINTS ${LLVM_TOOLS_BINARY_DIR})
24+
find_program(CLANG_TIDY_EXE REQUIRED NAMES "clang-tidy-${LLVM_VERSION_MAJOR}" "clang-tidy" HINTS ${LLVM_TOOLS_BINARY_DIR})
2525
message(STATUS "Found LLVM ${LLVM_PACKAGE_VERSION}")
2626
message(STATUS "Found clang-tidy: ${CLANG_TIDY_EXE}")
2727

contrib/devtools/bitcoin-tidy/bitcoin-tidy.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
#include "nontrivial-threadlocal.h"
66

77
#include <clang-tidy/ClangTidyModule.h>
8-
#include <clang-tidy/ClangTidyModuleRegistry.h>
98

109
class BitcoinModule final : public clang::tidy::ClangTidyModule
1110
{

src/script/interpreter.cpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1258,12 +1258,8 @@ class CTransactionSignatureSerializer
12581258
const CScript& scriptCode; //!< output script being consumed
12591259
const unsigned int nIn; //!< input index of txTo being signed
12601260
const bool fAnyoneCanPay; //!< whether the hashtype has the SIGHASH_ANYONECANPAY flag set
1261-
// Temporary workaround for a clang-tidy bug fixed in version 22.
1262-
// See: https://github.com/llvm/llvm-project/issues/160394.
1263-
// NOLINTBEGIN(modernize-use-default-member-init)
12641261
const bool fHashSingle; //!< whether the hashtype is SIGHASH_SINGLE
12651262
const bool fHashNone; //!< whether the hashtype is SIGHASH_NONE
1266-
// NOLINTEND(modernize-use-default-member-init)
12671263

12681264
public:
12691265
CTransactionSignatureSerializer(const T& txToIn, const CScript& scriptCodeIn, unsigned int nInIn, int nHashTypeIn) :

0 commit comments

Comments
 (0)