From e4e61cfe69675a5eded4302095648bfccd4391da Mon Sep 17 00:00:00 2001 From: John Wellbelove Date: Mon, 14 Jun 2021 13:11:03 +0100 Subject: [PATCH 1/5] Fixed ambiguous function call for clang --- .github/workflows/clang.yml | 2 +- include/etl/mem_cast.h | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/clang.yml b/.github/workflows/clang.yml index 35b012c1..381a76d2 100644 --- a/.github/workflows/clang.yml +++ b/.github/workflows/clang.yml @@ -1,7 +1,7 @@ name: clang on: push: - branches: [ master ] + branches: [ master, feature/mem_cast ] pull_request: branches: [ master ] diff --git a/include/etl/mem_cast.h b/include/etl/mem_cast.h index a10905da..1dc30041 100644 --- a/include/etl/mem_cast.h +++ b/include/etl/mem_cast.h @@ -529,7 +529,9 @@ namespace etl //*********************************** ETL_NODISCARD size_t alignment() const { - const uintptr_t p = reinterpret_cast(pbuffer); + typedef typename etl::smallest_uint_for_bits::type type; + + const uintptr_t p = reinterpret_cast(pbuffer); return 1U << etl::count_trailing_zeros(p); } From f68624f90932d664d5d55579b59ca16faa40c342 Mon Sep 17 00:00:00 2001 From: John Wellbelove Date: Mon, 14 Jun 2021 13:18:17 +0100 Subject: [PATCH 2/5] Fixed ambiguous function call for clang --- .github/workflows/clang.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/clang.yml b/.github/workflows/clang.yml index 381a76d2..d9d55e8c 100644 --- a/.github/workflows/clang.yml +++ b/.github/workflows/clang.yml @@ -1,7 +1,7 @@ name: clang on: push: - branches: [ master, feature/mem_cast ] + branches: [ feature/mem_cast ] pull_request: branches: [ master ] From 1781be7702d8af7233772196cea0610331cbe5e1 Mon Sep 17 00:00:00 2001 From: John Wellbelove Date: Mon, 14 Jun 2021 13:23:41 +0100 Subject: [PATCH 3/5] Fixed ambiguous function call for clang --- .github/workflows/clang.yml | 21 +++++++++++++++++++++ include/etl/mem_cast.h | 2 +- 2 files changed, 22 insertions(+), 1 deletion(-) diff --git a/.github/workflows/clang.yml b/.github/workflows/clang.yml index d9d55e8c..e27e4701 100644 --- a/.github/workflows/clang.yml +++ b/.github/workflows/clang.yml @@ -27,6 +27,27 @@ jobs: - name: Run tests run: ./test/etl_tests + build-clang-10-linux: + name: Clang-10 Linux + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [ubuntu-20.04] + + steps: + - uses: actions/checkout@v2 + + - name: Build + run: | + export CC=clang-10 + export CXX=clang++-10 + cmake -D BUILD_TESTS=ON ./ + clang --version + make + + - name: Run tests + run: ./test/etl_tests + build-clang-9-linux-no-stl: name: Clang-9 Linux - No STL runs-on: ${{ matrix.os }} diff --git a/include/etl/mem_cast.h b/include/etl/mem_cast.h index 1dc30041..3388d4ac 100644 --- a/include/etl/mem_cast.h +++ b/include/etl/mem_cast.h @@ -531,7 +531,7 @@ namespace etl { typedef typename etl::smallest_uint_for_bits::type type; - const uintptr_t p = reinterpret_cast(pbuffer); + const type p = reinterpret_cast(pbuffer); return 1U << etl::count_trailing_zeros(p); } From 2c8f079c6057dc83f8691b49201eb5614ce713b9 Mon Sep 17 00:00:00 2001 From: John Wellbelove Date: Mon, 14 Jun 2021 13:53:15 +0100 Subject: [PATCH 4/5] Fixed ambiguous function call for clang --- .github/workflows/clang.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/clang.yml b/.github/workflows/clang.yml index e27e4701..4ab31035 100644 --- a/.github/workflows/clang.yml +++ b/.github/workflows/clang.yml @@ -18,6 +18,8 @@ jobs: - name: Build run: | + sudo apt-get update + sudo apt-get install -y "clang-9" "lldb-9" "lld-9" "clang-format-9" export CC=clang-9 export CXX=clang++-9 cmake -D BUILD_TESTS=ON ./ From a287877ac985032dce280991f42afeb58cfe966c Mon Sep 17 00:00:00 2001 From: John Wellbelove Date: Mon, 14 Jun 2021 14:00:53 +0100 Subject: [PATCH 5/5] Fixed ambiguous function call for clang --- .github/workflows/clang.yml | 21 --------------------- 1 file changed, 21 deletions(-) diff --git a/.github/workflows/clang.yml b/.github/workflows/clang.yml index 4ab31035..144b506e 100644 --- a/.github/workflows/clang.yml +++ b/.github/workflows/clang.yml @@ -29,27 +29,6 @@ jobs: - name: Run tests run: ./test/etl_tests - build-clang-10-linux: - name: Clang-10 Linux - runs-on: ${{ matrix.os }} - strategy: - matrix: - os: [ubuntu-20.04] - - steps: - - uses: actions/checkout@v2 - - - name: Build - run: | - export CC=clang-10 - export CXX=clang++-10 - cmake -D BUILD_TESTS=ON ./ - clang --version - make - - - name: Run tests - run: ./test/etl_tests - build-clang-9-linux-no-stl: name: Clang-9 Linux - No STL runs-on: ${{ matrix.os }}