Skip to content

Commit 0fa326a

Browse files
authored
Use Clang image to run iwyu (#4574)
* 🔧 use Clang image to run iwyu * 🔧 use Clang image to run iwyu
1 parent 8314ac2 commit 0fa326a

File tree

3 files changed

+12
-11
lines changed

3 files changed

+12
-11
lines changed

.github/workflows/ubuntu.yml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,7 @@ jobs:
5050
matrix:
5151
target: [
5252
ci_test_amalgamation, # needs AStyle
53-
ci_infer, # needs Infer
54-
ci_single_binaries # needs iwyu
53+
ci_infer # needs Infer
5554
]
5655
steps:
5756
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
@@ -98,10 +97,10 @@ jobs:
9897
container: silkeh/clang:dev
9998
strategy:
10099
matrix:
101-
target: [ci_clang_tidy, ci_test_clang_sanitizer, ci_clang_analyze]
100+
target: [ci_clang_tidy, ci_test_clang_sanitizer, ci_clang_analyze, ci_single_binaries]
102101
steps:
103102
- name: Install git, clang-tools, and unzip
104-
run: apt-get update ; apt-get install -y git clang-tools unzip
103+
run: apt-get update ; apt-get install -y git clang-tools iwyu unzip
105104
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
106105
- name: Get latest CMake and ninja
107106
uses: lukka/get-cmake@5979409e62bdf841487c5fb3c053149de97a86d3 # v3.31.2

include/nlohmann/detail/conversions/to_json.hpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,13 @@
88

99
#pragma once
1010

11-
#include <algorithm> // copy
12-
#include <iterator> // begin, end
11+
#include <nlohmann/detail/macro_scope.hpp> // JSON_HAS_CPP_17
1312
#ifdef JSON_HAS_CPP_17
1413
#include <optional> // optional
1514
#endif
15+
16+
#include <algorithm> // copy
17+
#include <iterator> // begin, end
1618
#include <string> // string
1719
#include <tuple> // tuple, get
1820
#include <type_traits> // is_same, is_constructible, is_floating_point, is_enum, underlying_type
@@ -21,7 +23,6 @@
2123
#include <vector> // vector
2224

2325
#include <nlohmann/detail/iterators/iteration_proxy.hpp>
24-
#include <nlohmann/detail/macro_scope.hpp>
2526
#include <nlohmann/detail/meta/cpp_future.hpp>
2627
#include <nlohmann/detail/meta/std_fs.hpp>
2728
#include <nlohmann/detail/meta/type_traits.hpp>

single_include/nlohmann/json.hpp

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5267,11 +5267,14 @@ NLOHMANN_JSON_NAMESPACE_END
52675267

52685268

52695269

5270-
#include <algorithm> // copy
5271-
#include <iterator> // begin, end
5270+
// #include <nlohmann/detail/macro_scope.hpp>
5271+
// JSON_HAS_CPP_17
52725272
#ifdef JSON_HAS_CPP_17
52735273
#include <optional> // optional
52745274
#endif
5275+
5276+
#include <algorithm> // copy
5277+
#include <iterator> // begin, end
52755278
#include <string> // string
52765279
#include <tuple> // tuple, get
52775280
#include <type_traits> // is_same, is_constructible, is_floating_point, is_enum, underlying_type
@@ -5558,8 +5561,6 @@ class tuple_element<N, ::nlohmann::detail::iteration_proxy_value<IteratorType >>
55585561
inline constexpr bool ::std::ranges::enable_borrowed_range<::nlohmann::detail::iteration_proxy<IteratorType>> = true;
55595562
#endif
55605563

5561-
// #include <nlohmann/detail/macro_scope.hpp>
5562-
55635564
// #include <nlohmann/detail/meta/cpp_future.hpp>
55645565

55655566
// #include <nlohmann/detail/meta/std_fs.hpp>

0 commit comments

Comments
 (0)