Skip to content

Commit 3641082

Browse files
authored
Merge pull request #163 from elbeno/update-clang-tidy
🚨 Update clang-tidy for C++20 checks
2 parents 5530b5d + fb1b270 commit 3641082

File tree

16 files changed

+38
-4
lines changed

16 files changed

+38
-4
lines changed

.github/workflows/asciidoctor-ghpages.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ jobs:
3535
- name: Checkout source
3636
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
3737
- name: Setup Node.js
38-
uses: actions/setup-node@0a44ba7841725637a19e28fa30b79a866c81b0a6 # v4.0.4
38+
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
3939
with:
4040
node-version: 20
4141
- name: Install Mermaid

.github/workflows/unit_tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,7 @@ jobs:
268268
CC: "/usr/lib/llvm-${{env.DEFAULT_LLVM_VERSION}}/bin/clang"
269269
CXX: "/usr/lib/llvm-${{env.DEFAULT_LLVM_VERSION}}/bin/clang++"
270270
PR_TARGET_BRANCH: ${{ steps.target_branch.outputs.branch }}
271-
run: cmake -B ${{github.workspace}}/build -DCMAKE_CXX_STANDARD=17 -DCPM_SOURCE_CACHE=~/cpm-cache
271+
run: cmake -B ${{github.workspace}}/build -DCMAKE_CXX_STANDARD=${{env.DEFAULT_CXX_STANDARD}} -DCPM_SOURCE_CACHE=~/cpm-cache
272272

273273
- name: Save CPM cache
274274
env:

include/stdx/atomic.hpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
#include <atomic>
66
#include <type_traits>
77

8+
// NOLINTBEGIN(cppcoreguidelines-macro-usage)
89
#if __cplusplus >= 202002L
910
#define CPP20(...) __VA_ARGS__
1011
#else
@@ -123,3 +124,5 @@ template <typename T> class atomic {
123124
};
124125
} // namespace v1
125126
} // namespace stdx
127+
128+
// NOLINTEND(cppcoreguidelines-macro-usage)

include/stdx/atomic_bitset.hpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ class atomic_bitset {
5050
auto const len = std::min(n, str.size() - pos);
5151
auto const s = str.substr(pos, std::min(len, N));
5252
auto i = bit;
53+
// NOLINTNEXTLINE(modernize-loop-convert)
5354
for (auto it = std::rbegin(s); it != std::rend(s); ++it) {
5455
if (*it == one) {
5556
ret |= i;

include/stdx/bit.hpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@
1313
#include <bit>
1414
#endif
1515

16+
// NOLINTBEGIN(modernize-use-constraints)
17+
1618
namespace stdx {
1719
inline namespace v1 {
1820

@@ -357,3 +359,5 @@ template <std::size_t N> CONSTEVAL auto smallest_uint() {
357359
template <std::size_t N> using smallest_uint_t = decltype(smallest_uint<N>());
358360
} // namespace v1
359361
} // namespace stdx
362+
363+
// NOLINTEND(modernize-use-constraints)

include/stdx/bitset.hpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,7 @@ class bitset {
153153
auto const len = std::min(n, str.size() - pos);
154154
auto i = std::size_t{};
155155
auto const s = str.substr(pos, std::min(len, N));
156+
// NOLINTNEXTLINE(modernize-loop-convert)
156157
for (auto it = std::rbegin(s); it != std::rend(s); ++it) {
157158
set(i++, *it == one);
158159
}

include/stdx/byterator.hpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@
1010
#include <iterator>
1111
#include <type_traits>
1212

13+
// NOLINTBEGIN(modernize-use-constraints)
14+
1315
namespace stdx {
1416
inline namespace v1 {
1517

@@ -210,3 +212,5 @@ byterator(It) -> byterator<detail::iterator_value_t<It>>;
210212

211213
} // namespace v1
212214
} // namespace stdx
215+
216+
// NOLINTEND(modernize-use-constraints)

include/stdx/ct_string.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ inline namespace v1 {
1414
template <std::size_t N> struct ct_string {
1515
CONSTEVAL ct_string() = default;
1616

17-
// NOLINTNEXTLINE(*-avoid-c-arrays)
17+
// NOLINTNEXTLINE(*-avoid-c-arrays, google-explicit-constructor)
1818
CONSTEVAL explicit(false) ct_string(char const (&str)[N]) {
1919
for (auto i = std::size_t{}; i < N; ++i) {
2020
// NOLINTNEXTLINE(cppcoreguidelines-pro-bounds-*)

include/stdx/cx_map.hpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ template <typename Key, typename Value, std::size_t N> class cx_map {
3737

3838
public:
3939
constexpr cx_map() = default;
40+
// NOLINTNEXTLINE(modernize-use-constraints)
4041
template <typename... Vs, std::enable_if_t<((sizeof...(Vs) <= N) and ... and
4142
stdx::same_as<value_type, Vs>),
4243
int> = 0>

include/stdx/cx_set.hpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ template <typename Key, std::size_t N> class cx_set {
2424

2525
constexpr cx_set() = default;
2626
template <typename... Ts,
27+
// NOLINTNEXTLINE(modernize-use-constraints)
2728
std::enable_if_t<((sizeof...(Ts) <= N) and ... and
2829
stdx::convertible_to<key_type, Ts>),
2930
int> = 0>

0 commit comments

Comments
 (0)