From 5b20d172ca2a46a2b525201b4ff2444f9d415d8c Mon Sep 17 00:00:00 2001 From: Hennadii Stepanov <32963518+hebasto@users.noreply.github.com> Date: Tue, 23 Sep 2025 22:14:27 +0100 Subject: [PATCH] clang-tidy: Disable `ArrayBound` check in src/ipc and src/test --- src/ipc/.clang-tidy.in | 8 +++++--- src/test/.clang-tidy.in | 3 +++ src/test/CMakeLists.txt | 2 ++ 3 files changed, 10 insertions(+), 3 deletions(-) create mode 100644 src/test/.clang-tidy.in diff --git a/src/ipc/.clang-tidy.in b/src/ipc/.clang-tidy.in index 2fc880ed078..68dcb297959 100644 --- a/src/ipc/.clang-tidy.in +++ b/src/ipc/.clang-tidy.in @@ -1,3 +1,5 @@ -Checks: ' --clang-analyzer-core.UndefinedBinaryOperatorResult, -' +Checks: + # See: https://github.com/capnproto/capnproto/pull/2334. + - "-clang-analyzer-core.UndefinedBinaryOperatorResult" + # See: https://github.com/capnproto/capnproto/pull/2417. + - "-clang-analyzer-security.ArrayBound" diff --git a/src/test/.clang-tidy.in b/src/test/.clang-tidy.in new file mode 100644 index 00000000000..92d24f6f660 --- /dev/null +++ b/src/test/.clang-tidy.in @@ -0,0 +1,3 @@ +Checks: + # See: https://github.com/capnproto/capnproto/pull/2417. + - "-clang-analyzer-security.ArrayBound" diff --git a/src/test/CMakeLists.txt b/src/test/CMakeLists.txt index c963afff351..cadc1f29a63 100644 --- a/src/test/CMakeLists.txt +++ b/src/test/CMakeLists.txt @@ -177,6 +177,8 @@ if(ENABLE_IPC) ipc_tests.cpp ) target_link_libraries(test_bitcoin bitcoin_ipc_test bitcoin_ipc) + + configure_file(.clang-tidy.in .clang-tidy USE_SOURCE_PERMISSIONS COPYONLY) endif() function(add_boost_test source_file)