Skip to content

Commit c8d1884

Browse files
committed
👷 Add clang-21 to CI
Problem: - Clang 21 has been released and is not yet used by CI. Solution: - Add clang-21 to CI.
1 parent 588f913 commit c8d1884

File tree

5 files changed

+19
-9
lines changed

5 files changed

+19
-9
lines changed

.github/workflows/unit_tests.yml

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ env:
1313
DEBIAN_FRONTEND: noninteractive
1414
CMAKE_GENERATOR: Ninja
1515
DEFAULT_CXX_STANDARD: 20
16-
DEFAULT_LLVM_VERSION: 20
16+
DEFAULT_LLVM_VERSION: 21
1717
DEFAULT_GCC_VERSION: 14
1818

1919
concurrency:
@@ -27,7 +27,7 @@ jobs:
2727
fail-fast: false
2828
matrix:
2929
compiler: [clang, gcc]
30-
version: [12, 13, 14, 16, 17, 18, 19, 20]
30+
version: [12, 13, 14, 16, 17, 18, 19, 20, 21]
3131
cxx_standard: [20]
3232
stdlib: [libstdc++, libc++]
3333
build_type: [Debug]
@@ -36,6 +36,15 @@ jobs:
3636
cc: "clang"
3737
cxx: "clang++"
3838
cxx_flags: "-stdlib=libstdc++"
39+
- version: 21
40+
compiler: clang
41+
install: wget https://apt.llvm.org/llvm.sh && chmod +x llvm.sh && sudo ./llvm.sh 21
42+
toolchain_root: "/usr/lib/llvm-21"
43+
- version: 21
44+
compiler: clang
45+
stdlib: libc++
46+
install: wget https://apt.llvm.org/llvm.sh && chmod +x llvm.sh && sudo ./llvm.sh 21 && sudo apt install -y libc++-21-dev libc++abi-21-dev
47+
cxx_flags: "-stdlib=libc++"
3948
- version: 20
4049
compiler: clang
4150
install: wget https://apt.llvm.org/llvm.sh && chmod +x llvm.sh && sudo ./llvm.sh 20 all
@@ -101,6 +110,8 @@ jobs:
101110
cxx: "g++-12"
102111
cxx_flags: ""
103112
exclude:
113+
- compiler: gcc
114+
version: 21
104115
- compiler: gcc
105116
version: 20
106117
- compiler: gcc

docs/intro.adoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ file for information.
1313

1414
The following compilers are supported:
1515

16-
* clang 14 thru 17
17-
* GCC 12 thru 13
16+
* clang 14 thru 21
17+
* GCC 12 thru 14
1818

1919
C++20 is required.
2020

include/flow/step.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ template <stdx::ct_string Type, stdx::ct_string Name, typename F>
4141
cib::detail::always_condition_t, F>{};
4242
}
4343

44-
constexpr auto empty_func = []() {};
44+
constexpr auto empty_func = []() -> void {};
4545
} // namespace detail
4646

4747
template <stdx::ct_string Name, typename F>

include/msg/field.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ struct bits_locator_t {
202202
template <std::uint32_t NumBits>
203203
constexpr static auto fits_inside() -> bool {
204204
constexpr auto Msb = Lsb + BitSize - 1;
205-
return Index * 32 + Msb <= NumBits;
205+
return (Index * 32) + Msb <= NumBits;
206206
}
207207

208208
template <typename T> constexpr static auto extent_in() -> std::size_t {

include/msg/indexed_builder.hpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,11 +65,10 @@ struct indexed_builder
6565

6666
constexpr auto baked_indices =
6767
temp_indices.apply([&]<typename... I>(I...) {
68-
return indices {
68+
return indices{
6969
index{typename I::field_type{},
7070
make_index_lookup.template operator()<I>(
71-
entry_index_seq.template operator()<I>())}...
72-
};
71+
entry_index_seq.template operator()<I>())}...};
7372
});
7473

7574
constexpr auto num_callbacks = BuilderValue::value.callbacks.size();

0 commit comments

Comments
 (0)