Merge bitcoin/bitcoin#32673: clang-tidy: Apply modernize-deprecated-headers

fa9ca13f35 refactor: Sort includes of touched source files (MarcoFalke)
facb152697 scripted-diff: Bump copyright headers after include changes (MarcoFalke)
fae71d30f7 clang-tidy: Apply modernize-deprecated-headers (MarcoFalke)

Pull request description:

  Bitcoin Core is written in C++, so it is confusing to sometimes use the deprecated C headers (with the `.h` extension). For example, it is less clear whether `string.h` refers to the file in this repo or the cstring stdlib header (https://github.com/bitcoin/bitcoin/pull/31308#discussion_r2121492797).

  The check is currently disabled for headers, to exclude subtree headers.

ACKs for top commit:
  l0rinc:
    ACK fa9ca13f35
  achow101:
    ACK fa9ca13f35
  janb84:
    ACK fa9ca13f35
  stickies-v:
    ACK fa9ca13f35

Tree-SHA512: 6639608308c598d612e24435aa519afe92d71b955874b87e527245291fb874b67f3ab95d3a0a5125c6adce5eb41c0d62f6ca488fbbfd60a94f2063d734173f4d
This commit is contained in:
Ava Chow
2025-06-11 15:08:23 -07:00
87 changed files with 178 additions and 173 deletions

View File

@@ -1,4 +1,4 @@
// Copyright (c) 2020-2022 The Bitcoin Core developers
// Copyright (c) 2020-present The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
@@ -14,12 +14,12 @@
#include <test/fuzz/util.h>
#include <test/fuzz/util/net.h>
#include <test/util/setup_common.h>
#include <time.h>
#include <util/asmap.h>
#include <util/chaintype.h>
#include <cassert>
#include <cstdint>
#include <ctime>
#include <optional>
#include <string>
#include <vector>

View File

@@ -1,4 +1,4 @@
// Copyright (c) 2020-2021 The Bitcoin Core developers
// Copyright (c) 2020-present The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
@@ -10,7 +10,7 @@
#include <optional>
#include <vector>
#include <assert.h>
#include <cassert>
FUZZ_TARGET(asmap_direct)
{

View File

@@ -6,16 +6,16 @@
#include <random.h>
#include <serialize.h>
#include <streams.h>
#include <test/fuzz/fuzz.h>
#include <test/fuzz/FuzzedDataProvider.h>
#include <test/fuzz/fuzz.h>
#include <test/util/cluster_linearize.h>
#include <util/bitset.h>
#include <util/feefrac.h>
#include <algorithm>
#include <stdint.h>
#include <vector>
#include <cstdint>
#include <utility>
#include <vector>
using namespace cluster_linearize;

View File

@@ -1,18 +1,18 @@
// Copyright (c) 2023 The Bitcoin Core developers
// Copyright (c) 2023-present The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include <coins.h>
#include <crypto/sha256.h>
#include <primitives/transaction.h>
#include <test/fuzz/fuzz.h>
#include <test/fuzz/FuzzedDataProvider.h>
#include <test/fuzz/fuzz.h>
#include <test/fuzz/util.h>
#include <assert.h>
#include <optional>
#include <cassert>
#include <cstdint>
#include <memory>
#include <stdint.h>
#include <optional>
#include <vector>
namespace {

View File

@@ -1,4 +1,4 @@
// Copyright (c) 2009-2021 The Bitcoin Core developers
// Copyright (c) 2009-present The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
@@ -29,10 +29,10 @@
#include <test/util/setup_common.h>
#include <undo.h>
#include <cstdint>
#include <exception>
#include <optional>
#include <stdexcept>
#include <stdint.h>
using node::SnapshotMetadata;

View File

@@ -2,7 +2,7 @@
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include <stdint.h>
#include <cstdint>
#include <vector>
@@ -12,7 +12,7 @@
#include <test/fuzz/fuzz.h>
#include <test/fuzz/util.h>
#include <assert.h>
#include <cassert>
namespace {

View File

@@ -2,20 +2,20 @@
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include <txgraph.h>
#include <cluster_linearize.h>
#include <test/fuzz/fuzz.h>
#include <test/fuzz/FuzzedDataProvider.h>
#include <test/fuzz/fuzz.h>
#include <test/util/random.h>
#include <txgraph.h>
#include <util/bitset.h>
#include <util/feefrac.h>
#include <algorithm>
#include <cstdint>
#include <iterator>
#include <map>
#include <memory>
#include <set>
#include <stdint.h>
#include <utility>
using namespace cluster_linearize;

View File

@@ -7,8 +7,8 @@
#include <test/fuzz/util.h>
#include <util/vecdeque.h>
#include <cstdint>
#include <deque>
#include <stdint.h>
namespace {