Skip to content

Commit baf6241

Browse files
committed
⬆️ Add support for clang-19
1 parent 2b8a6d7 commit baf6241

30 files changed

+147
-126
lines changed

.github/workflows/performance_test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ env:
1111
DEBIAN_FRONTEND: noninteractive
1212
CMAKE_GENERATOR: Ninja
1313
BUILD_TYPE: Release
14-
LLVM_VERSION: 18
14+
LLVM_VERSION: 19
1515

1616
jobs:
1717
performance_test:

.github/workflows/unit_tests.yml

Lines changed: 15 additions & 4 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: 18
16+
DEFAULT_LLVM_VERSION: 19
1717
DEFAULT_GCC_VERSION: 13
1818

1919
concurrency:
@@ -27,7 +27,7 @@ jobs:
2727
fail-fast: false
2828
matrix:
2929
compiler: [clang, gcc]
30-
version: [12, 13, 16, 17, 18]
30+
version: [12, 13, 16, 17, 18, 19]
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: 19
40+
compiler: clang
41+
install: wget https://apt.llvm.org/llvm.sh && chmod +x llvm.sh && sudo ./llvm.sh 19
42+
toolchain_root: "/usr/lib/llvm-19"
43+
- version: 19
44+
compiler: clang
45+
stdlib: libc++
46+
install: wget https://apt.llvm.org/llvm.sh && chmod +x llvm.sh && sudo ./llvm.sh 19 && sudo apt install -y libc++-19-dev libc++abi-19-dev
47+
cxx_flags: "-stdlib=libc++"
3948
- version: 18
4049
compiler: clang
4150
install: wget https://apt.llvm.org/llvm.sh && chmod +x llvm.sh && sudo ./llvm.sh 18
@@ -78,6 +87,8 @@ jobs:
7887
cxx: "g++-12"
7988
cxx_flags: ""
8089
exclude:
90+
- compiler: gcc
91+
version: 19
8192
- compiler: gcc
8293
version: 18
8394
- compiler: gcc
@@ -282,8 +293,8 @@ jobs:
282293
- compiler: clang
283294
cc: "clang"
284295
cxx: "clang++"
285-
install: wget https://apt.llvm.org/llvm.sh && chmod +x llvm.sh && sudo ./llvm.sh 18
286-
toolchain_root: "/usr/lib/llvm-18"
296+
install: wget https://apt.llvm.org/llvm.sh && chmod +x llvm.sh && sudo ./llvm.sh 19
297+
toolchain_root: "/usr/lib/llvm-19"
287298
- compiler: gcc
288299
cc: "gcc-13"
289300
cxx: "g++-13"

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ to implement *cib* and others extend *cib*.
3232
## Compiler/Standard support
3333

3434
The main branch of *cib* currently uses C++20 and is tested with:
35-
- Clang 14 thru 18
35+
- Clang 14 thru 19
3636
- GCC 12 thru 13
3737

3838
An older version of *cib* that uses C++17 is tagged at v1.7.0. It

include/cib/detail/exports.hpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,13 @@ template <typename ServiceT, typename BuilderT> struct service_entry {
1212
};
1313

1414
template <typename... Services> struct exports : public detail::config_item {
15-
[[nodiscard]] constexpr auto
16-
extends_tuple() const -> stdx::tuple<extend<Services>...> {
15+
[[nodiscard]] constexpr auto extends_tuple() const
16+
-> stdx::tuple<extend<Services>...> {
1717
return {extend<Services>{}...};
1818
}
1919

20-
[[nodiscard]] constexpr auto
21-
exports_tuple() const -> stdx::tuple<Services...> {
20+
[[nodiscard]] constexpr auto exports_tuple() const
21+
-> stdx::tuple<Services...> {
2222
return {};
2323
}
2424
};

include/flow/graph_builder.hpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,8 @@ concept is_output_compatible = requires(CTNode n) {
3535

3636
template <typename T> using name_for = typename T::name_t;
3737

38-
[[nodiscard]] constexpr auto edge_size(auto const &nodes,
39-
auto const &edges) -> std::size_t {
38+
[[nodiscard]] constexpr auto edge_size(auto const &nodes, auto const &edges)
39+
-> std::size_t {
4040
auto const edge_capacities = transform(
4141
[&]<typename N>(N const &) {
4242
return edges.fold_left(
@@ -134,8 +134,8 @@ struct graph_builder {
134134
}
135135

136136
template <typename Output, typename Graph>
137-
[[nodiscard]] constexpr static auto
138-
topo_sort(Graph &g) -> std::optional<Output> {
137+
[[nodiscard]] constexpr static auto topo_sort(Graph &g)
138+
-> std::optional<Output> {
139139
stdx::cx_vector<typename Graph::key_type, Graph::capacity()>
140140
ordered_list{};
141141

include/log/env.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ template <std::size_t... Is> struct for_each_pair<std::index_sequence<Is...>> {
6666
prop<boost::mp11::mp_at_c<boost::mp11::mp_list<wrap<Args>...>,
6767
2 * Is>::value.value,
6868
stdx::ct<boost::mp11::mp_at_c<boost::mp11::mp_list<wrap<Args>...>,
69-
2 * Is + 1>::value.value>()>...>;
69+
(2 * Is) + 1>::value.value>()>...>;
7070
};
7171
} // namespace detail
7272

include/lookup/detail/select.hpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ constexpr inline auto fallback_select_lt(K lhs, K rhs, T first, T second) -> T {
2424
#if defined(__arc__) or defined(_ARC) or defined(_ARCOMPACT)
2525
template <typename K, typename T>
2626
requires(sizeof(T) <= 4) and (sizeof(K) <= 4)
27-
static inline auto optimized_select(K raw_lhs, K raw_rhs, T first,
28-
T second) -> T {
27+
static inline auto optimized_select(K raw_lhs, K raw_rhs, T first, T second)
28+
-> T {
2929
T result = second;
3030
auto const lhs = static_cast<std::uint32_t>(raw_lhs);
3131
auto const rhs = static_cast<std::uint32_t>(raw_rhs);
@@ -45,8 +45,8 @@ static inline auto optimized_select(K raw_lhs, K raw_rhs, T first,
4545

4646
template <typename K, typename T>
4747
requires(sizeof(T) <= 4) and (sizeof(K) <= 4)
48-
static inline auto optimized_select_lt(K raw_lhs, K raw_rhs, T first,
49-
T second) -> T {
48+
static inline auto optimized_select_lt(K raw_lhs, K raw_rhs, T first, T second)
49+
-> T {
5050
T result = second;
5151
auto const lhs = static_cast<std::uint32_t>(raw_lhs);
5252
auto const rhs = static_cast<std::uint32_t>(raw_rhs);

include/lookup/linear_search_lookup.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ template <std::size_t MaxSize> struct linear_search_lookup {
1515
using key_type = typename Input::key_type;
1616
using value_type = typename Input::value_type;
1717

18-
[[nodiscard]] constexpr auto
19-
operator[](key_type key) const -> value_type {
18+
[[nodiscard]] constexpr auto operator[](key_type key) const
19+
-> value_type {
2020
value_type result = this->default_value;
2121
for (auto [k, v] : this->entries) {
2222
result = detail::select(key, k, v, result);

include/lookup/pseudo_pext_lookup.hpp

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -159,8 +159,8 @@ constexpr auto keys_are_unique(std::array<T, S> const &keys) -> bool {
159159
}
160160

161161
template <typename T, std::size_t S>
162-
constexpr auto with_mask(T const mask,
163-
std::array<T, S> const &keys) -> std::array<T, S> {
162+
constexpr auto with_mask(T const mask, std::array<T, S> const &keys)
163+
-> std::array<T, S> {
164164
std::array<T, S> new_keys{};
165165

166166
std::transform(keys.begin(), keys.end(), new_keys.begin(),
@@ -182,9 +182,9 @@ constexpr auto get_keys(std::array<entry<T, V>, S> const &entries) {
182182
}
183183

184184
template <typename T, std::size_t S>
185-
constexpr auto
186-
remove_cheapest_bit(detail::raw_integral_t<T> mask,
187-
std::array<T, S> keys) -> detail::raw_integral_t<T> {
185+
constexpr auto remove_cheapest_bit(detail::raw_integral_t<T> mask,
186+
std::array<T, S> keys)
187+
-> detail::raw_integral_t<T> {
188188
using raw_t = detail::raw_integral_t<T>;
189189

190190
auto const t_digits = std::numeric_limits<raw_t>::digits;
@@ -287,8 +287,8 @@ struct pseudo_pext_lookup {
287287
constexpr static Value default_value = Default::value;
288288
Storage storage;
289289

290-
[[nodiscard]] constexpr auto
291-
operator[](key_type key) const -> value_type {
290+
[[nodiscard]] constexpr auto operator[](key_type key) const
291+
-> value_type {
292292
auto const raw_key = detail::as_raw_integral(key);
293293
auto const e = storage[pext_func(raw_key)];
294294

@@ -326,8 +326,8 @@ struct pseudo_pext_lookup {
326326
LookupTable lookup_table;
327327
Storage storage;
328328

329-
[[nodiscard]] constexpr auto
330-
operator[](key_type key) const -> value_type {
329+
[[nodiscard]] constexpr auto operator[](key_type key) const
330+
-> value_type {
331331
auto const raw_key = detail::as_raw_integral(key);
332332
auto i = lookup_table[pext_func(raw_key)];
333333

include/lookup/strategies.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ namespace lookup {
99
template <typename...> struct strategies;
1010

1111
template <> struct strategies<> {
12-
[[nodiscard]] CONSTEVAL static auto
13-
make(compile_time auto) -> strategy_failed_t {
12+
[[nodiscard]] CONSTEVAL static auto make(compile_time auto)
13+
-> strategy_failed_t {
1414
return {};
1515
}
1616
};

0 commit comments

Comments
 (0)