From c8bfa8aaf721979b4f5fca3efdc8474f11241529 Mon Sep 17 00:00:00 2001 From: Bernhard Manfred Gruber Date: Mon, 28 Mar 2022 10:41:32 +0200 Subject: [PATCH] add clang-14 to CI --- .github/workflows/ci.yaml | 6 +++++- include/llama/HasRanges.hpp | 4 ++-- tests/iterator.cpp | 5 ----- 3 files changed, 7 insertions(+), 8 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index ffbcf95331..aa401caefa 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -163,6 +163,10 @@ jobs: cxx: clang++-13 install_extra: clang-13 libomp-13-dev add_llvm_repo: true + - name: build-ubuntu-clang14 + cxx: clang++-14 + install_extra: clang-14 libomp-14-dev + add_llvm_repo: true - name: build-ubuntu-icpx cxx: icpx install_oneapi: true @@ -177,9 +181,9 @@ jobs: if: matrix.add_llvm_repo run: | wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key|sudo apt-key add - - sudo add-apt-repository 'deb http://apt.llvm.org/focal/ llvm-toolchain-focal main' sudo add-apt-repository 'deb http://apt.llvm.org/focal/ llvm-toolchain-focal-12 main' sudo add-apt-repository 'deb http://apt.llvm.org/focal/ llvm-toolchain-focal-13 main' + sudo add-apt-repository 'deb http://apt.llvm.org/focal/ llvm-toolchain-focal-14 main' - name: install OneAPI if: matrix.install_oneapi run: | diff --git a/include/llama/HasRanges.hpp b/include/llama/HasRanges.hpp index 0dfe25db67..aea97ad043 100644 --- a/include/llama/HasRanges.hpp +++ b/include/llama/HasRanges.hpp @@ -2,13 +2,13 @@ #pragma once -// TODO(bgruber): clang 10-13 (libstdc++ from gcc 11.2) fail to compile this currently with the issue described here: +// TODO(bgruber): clang 10-14 (libstdc++ from gcc 11.2) fail to compile this currently with the issue described here: // https://stackoverflow.com/questions/64300832/why-does-clang-think-gccs-subrange-does-not-satisfy-gccs-ranges-begin-functi // Intel LLVM compiler is also using the clang frontend #define CAN_USE_RANGES 0 #if __has_include() # include -# if defined(__cpp_concepts) && defined(__cpp_lib_ranges) && (!defined(__clang__) || __clang_major__ >= 14) \ +# if defined(__cpp_concepts) && defined(__cpp_lib_ranges) && (!defined(__clang__) || __clang_major__ >= 15) \ && !defined(__INTEL_LLVM_COMPILER) # undef CAN_USE_RANGES # define CAN_USE_RANGES 1 diff --git a/tests/iterator.cpp b/tests/iterator.cpp index b766278c66..08e2d655f2 100644 --- a/tests/iterator.cpp +++ b/tests/iterator.cpp @@ -217,13 +217,8 @@ TEST_CASE("iterator.different_record_dim") } } -// TODO(bgruber): clang 10 and 11 fail to compile this currently with the issue described here: -// https://stackoverflow.com/questions/64300832/why-does-clang-think-gccs-subrange-does-not-satisfy-gccs-ranges-begin-functi -// let's try again with clang 12 -// Intel LLVM compiler is also using the clang frontend #if CAN_USE_RANGES # include - TEST_CASE("ranges") { auto test = [](auto extents)