From 0b6942ac823a276fdf7f7c5c6156df64365695b3 Mon Sep 17 00:00:00 2001 From: Stephen Nicholas Swatman Date: Thu, 13 Jun 2024 17:43:43 +0200 Subject: [PATCH] Bump clang-format to version 18 The version of clang-format that we use in this project is quite old (version 10) and it is no longer able to properly format all of the new stuff that has come into C++. See, for example, the formatting nightmares in #609 and #602. This commit bumps the formatter up to clang-format 18. --- .github/workflows/checks.yml | 2 +- core/include/traccc/utils/array_wrapper.hpp | 7 +++++-- device/futhark/include/traccc/futhark/wrapper.hpp | 4 ++-- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/.github/workflows/checks.yml b/.github/workflows/checks.yml index 61cea1c018..e9a3160886 100644 --- a/.github/workflows/checks.yml +++ b/.github/workflows/checks.yml @@ -9,7 +9,7 @@ on: jobs: format: runs-on: ubuntu-latest - container: ghcr.io/acts-project/format10:v11 + container: ghcr.io/acts-project/format18:47 steps: - uses: actions/checkout@v3 - name: Check diff --git a/core/include/traccc/utils/array_wrapper.hpp b/core/include/traccc/utils/array_wrapper.hpp index 34b7395249..e53ee608e2 100644 --- a/core/include/traccc/utils/array_wrapper.hpp +++ b/core/include/traccc/utils/array_wrapper.hpp @@ -205,9 +205,12 @@ struct aos { constexpr std::size_t size() const { return _size; } constexpr const vecmem::unique_alloc_ptr[]>& pointer() - const { return _ptr; } + const { + return _ptr; + } - private : std::size_t _size; + private: + std::size_t _size; vecmem::unique_alloc_ptr[]> _ptr; }; diff --git a/device/futhark/include/traccc/futhark/wrapper.hpp b/device/futhark/include/traccc/futhark/wrapper.hpp index 1ae261ee40..4944c1e100 100644 --- a/device/futhark/include/traccc/futhark/wrapper.hpp +++ b/device/futhark/include/traccc/futhark/wrapper.hpp @@ -71,7 +71,7 @@ struct wrapper, std::tuple> { template static output_t run_helper(struct futhark_context &ctx, - std::vector &&... args, + std::vector &&...args, std::index_sequence, std::index_sequence) { std::tuple futhark_inputs = { @@ -145,7 +145,7 @@ struct wrapper, std::tuple> { } static std::tuple...> run( - std::vector &&... args) { + std::vector &&...args) { return run_helper( get_context(), std::forward>(args)...,