Skip to content

Commit

Permalink
Using Clang 17.
Browse files Browse the repository at this point in the history
  • Loading branch information
andreasfertig committed Oct 2, 2023
1 parent 7047fbe commit 20cc2a9
Show file tree
Hide file tree
Showing 56 changed files with 473 additions and 476 deletions.
56 changes: 28 additions & 28 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ on:
env:
CMAKE_VERSION: 3.16.2
NINJA_VERSION: 1.10.0
LLVM_VERSION: 16.0.0
LLVM_VERSION: 17.0.0

jobs:
checks:
Expand All @@ -29,7 +29,7 @@ jobs:
name: "Linux Clang - Format check",
os: ubuntu-20.04,
build_type: Release,
cformat_name: 'clang-format-16'
cformat_name: 'clang-format-17'
}

steps:
Expand All @@ -42,7 +42,7 @@ jobs:
run: |
wget https://apt.llvm.org/llvm.sh
chmod +x llvm.sh
sudo ./llvm.sh 16
sudo ./llvm.sh 17
sudo apt-get install ${{ matrix.config.cformat_name }}
- name: clang-format check
Expand All @@ -64,11 +64,11 @@ jobs:
config:
# AppleClang
- {
name: "Clang 16 / LLVM 16 @ macOS Release",
name: "Clang 17 / LLVM 17 @ macOS Release",
os: macos-11,
build_type: Release,
cxx: "clang++",
llvm_version: "16.0.0",
llvm_version: "17.0.0",
llvm_config: "llvm-config",
coverage: "No",
static: "No",
Expand All @@ -82,11 +82,11 @@ jobs:

# AppleClang
- {
name: "Clang 16 / LLVM 16 @ macOS Debug",
name: "Clang 17 / LLVM 17 @ macOS Debug",
os: macos-11,
build_type: Release,
cxx: "clang++",
llvm_version: "16.0.0",
llvm_version: "17.0.0",
llvm_config: "llvm-config",
coverage: "No",
static: "No",
Expand All @@ -100,11 +100,11 @@ jobs:

# # AppleClang
# - {
# name: "Clang 16 / LLVM 16 @ macOS Coverage & Debug",
# name: "Clang 17 / LLVM 17 @ macOS Coverage & Debug",
# os: macos-11,
# build_type: Release,
# cxx: "clang++",
# llvm_version: "16.0.0",
# llvm_version: "17.0.0",
# llvm_config: "llvm-config",
# coverage: "Yes",
# static: "No",
Expand All @@ -118,11 +118,11 @@ jobs:

# # MSVC 2019
# - {
# name: "MSVC 2022 / LLVM 16 @ Windows Release",
# name: "MSVC 2022 / LLVM 17 @ Windows Release",
# os: windows-2022,
# build_type: Release,
# cxx: "cl",
# llvm_version: "16.0.0",
# llvm_version: "17.0.0",
# llvm_config: "current/bin/llvm-config.exe",
# static: "Yes",
# debug: "No",
Expand All @@ -137,11 +137,11 @@ jobs:

# # MSVC 2019
# - {
# name: "MSVC 2022 / LLVM 16 @ Windows Debug",
# name: "MSVC 2022 / LLVM 17 @ Windows Debug",
# os: windows-2022,
# build_type: Release,
# cxx: "cl",
# llvm_version: "16.0.0",
# llvm_version: "17.0.0",
# llvm_config: "current/bin/llvm-config.exe",
# static: "Yes",
# debug: "Yes",
Expand All @@ -155,11 +155,11 @@ jobs:

# # MSVC 2019
# - {
# name: "MSVC 2022 / LLVM 16 @ Windows Code Coverage & Debug",
# name: "MSVC 2022 / LLVM 17 @ Windows Code Coverage & Debug",
# os: windows-2022,
# build_type: Release,
# cxx: "clang-cl.exe",
# llvm_version: "16.0.0",
# llvm_version: "17.0.0",
# llvm_config: "current/bin/llvm-config.exe",
# coverage: "Yes",
# static: "Yes",
Expand Down Expand Up @@ -322,7 +322,7 @@ jobs:
export HOMEBREW_NO_AUTO_UPDATE=1
brew update > /dev/null
brew install lcov || brew upgrade lcov
brew install gcc@10 || brew upgrade gcc@10 # for Clang 16 and newer gcov
brew install gcc@10 || brew upgrade gcc@10 # for Clang 17 and newer gcov
- name: Setup MSVC Dev
if: "startsWith(matrix.config.os, 'Windows')"
Expand Down Expand Up @@ -465,13 +465,13 @@ jobs:
fail-fast: false
matrix:
config:
# GCC 12 / LLVM 16
# GCC 12 / LLVM 17
- {
name: "GCC 12 / LLVM 16 @ Ubuntu Release @docker",
name: "GCC 12 / LLVM 17 @ Ubuntu Release @docker",
build_type: Release,
cxx: "g++-12",
llvm_version: "16.0.0",
llvm_config: "/usr/bin/llvm-config-16",
llvm_version: "17.0.0",
llvm_config: "/usr/bin/llvm-config-17",
coverage: "No",
static: "Yes",
debug: "No",
Expand All @@ -484,13 +484,13 @@ jobs:
docs: "Yes",
}

# GCC 12 / LLVM 16
# GCC 12 / LLVM 17
- {
name: "GCC 12 / LLVM 16 @ Ubuntu Code Coverage & Debug @docker",
name: "GCC 12 / LLVM 17 @ Ubuntu Code Coverage & Debug @docker",
build_type: Release,
cxx: "g++-12",
llvm_version: "16.0.0",
llvm_config: "/usr/bin/llvm-config-16",
llvm_version: "17.0.0",
llvm_config: "/usr/bin/llvm-config-17",
coverage: "Yes",
static: "No",
debug: "Yes",
Expand All @@ -501,13 +501,13 @@ jobs:
archive_name: "insights-ubuntu-14.04",
}

# GCC 12 / LLVM 16
# GCC 12 / LLVM 17
- {
name: "GCC 12 / LLVM 16 @ Ubuntu Code Coverage (libc++) @docker",
name: "GCC 12 / LLVM 17 @ Ubuntu Code Coverage (libc++) @docker",
build_type: Release,
cxx: "g++-12",
llvm_version: "16.0.0",
llvm_config: "/usr/bin/llvm-config-16",
llvm_version: "17.0.0",
llvm_config: "/usr/bin/llvm-config-17",
coverage: "Yes",
static: "No",
debug: "Yes",
Expand Down
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ option(INSIGHTS_STATIC "Use static linking" Off)

set(INSIGHTS_LLVM_CONFIG "llvm-config" CACHE STRING "LLVM config executable to use")

set(INSIGHTS_MIN_LLVM_MAJOR_VERSION 16)
set(INSIGHTS_MIN_LLVM_MAJOR_VERSION 17)
set(INSIGHTS_MIN_LLVM_VERSION ${INSIGHTS_MIN_LLVM_MAJOR_VERSION}.0)

if(NOT DEFINED LLVM_VERSION_MAJOR) # used when build inside the clang tool/extra folder
Expand Down
6 changes: 3 additions & 3 deletions scripts/prepare-release.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@
def main():
versionH = open('version.h.in', 'r').read()

oldClangStable = '15'
newClangStable = '16'
newInsightsVersion = '16.0'
oldClangStable = '16'
newClangStable = '17'
newInsightsVersion = '17.0'
oldInsightsVersion = re.search(r'INSIGHTS_VERSION\s+"(.*?)"', versionH, re.DOTALL | re.MULTILINE).group(1)


Expand Down
2 changes: 1 addition & 1 deletion tests/AlignAsTest.expect
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ struct AlignedStructWithPack
template<>
struct AlignedStructWithPack<int, char, double>
{
alignas(alignof(int)) alignas(alignof(char)) alignas(alignof(double)) char data;
alignas(int) alignas(char) alignas(double) char data;
// inline AlignedStructWithPack() noexcept = default;
};

Expand Down
2 changes: 1 addition & 1 deletion tests/DependentScopeDeclRefExprTest.expect
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ namespace Test
};

#endif
template<typename T, bool = static_cast<bool>(has<T>::value)>
template<typename T, bool = has<T>::value>
struct dependentScope
{
inline static constexpr const bool result = true;
Expand Down
16 changes: 8 additions & 8 deletions tests/EduCoroutineCaptureConstTest.cerr
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
.tmp.cpp:108:14: error: cannot assign to non-static data member 'start' with const-qualified type 'const int &'
__f->start = std::forward<const int &>(start);
~~~~~~~~~~ ^
108 | __f->start = std::forward<const int &>(start);
| ~~~~~~~~~~ ^
.tmp.cpp:87:15: note: non-static data member 'start' declared const here
const int & start;
~~~~~~~~~~~~^~~~~
87 | const int & start;
| ~~~~~~~~~~~~^~~~~
.tmp.cpp:152:12: error: no viable overloaded '='
__f->s = {0, '\0'};
~~~~~~ ^ ~~~~~~~~~
152 | __f->s = {0, '\0'};
| ~~~~~~ ^ ~~~~~~~~~
.tmp.cpp:89:10: note: candidate function (the implicit copy assignment operator) not viable: 'this' argument has type 'const S', but method is not marked const
struct S
^
89 | struct S
| ^
.tmp.cpp:89:10: note: candidate function (the implicit move assignment operator) not viable: 'this' argument has type 'const S', but method is not marked const
2 errors generated.
8 changes: 4 additions & 4 deletions tests/EduCoroutineCoAwaitOperatorTest.cerr
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
.tmp.cpp:174:3: error: unknown type name 'awaiter'
awaiter __suspend_54_5;
^
174 | awaiter __suspend_54_5;
| ^
.tmp.cpp:256:10: warning: expression result unused [-Wunused-value]
__f->__suspend_56_14_res;
~~~ ^~~~~~~~~~~~~~~~~~~
256 | __f->__suspend_56_14_res;
| ~~~ ^~~~~~~~~~~~~~~~~~~
1 warning and 1 error generated.
56 changes: 28 additions & 28 deletions tests/EduCoroutineCoreturnWithCoawaitTest.cerr
Original file line number Diff line number Diff line change
@@ -1,43 +1,43 @@
.tmp.cpp:279:26: error: object of type 'generator' cannot be assigned because its copy assignment operator is implicitly deleted
__f->__suspend_56_24 = simpleReturn(__f->v);
^
279 | __f->__suspend_56_24 = simpleReturn(__f->v);
| ^
.tmp.cpp:72:10: note: copy assignment operator is implicitly deleted because 'generator' has a user-declared move constructor
inline generator(generator && rhs)
^
72 | inline generator(generator && rhs)
| ^
.tmp.cpp:290:26: error: object of type 'generator' cannot be assigned because its copy assignment operator is implicitly deleted
__f->__suspend_56_51 = simpleReturn(__f->v + 1);
^
290 | __f->__suspend_56_51 = simpleReturn(__f->v + 1);
| ^
.tmp.cpp:72:10: note: copy assignment operator is implicitly deleted because 'generator' has a user-declared move constructor
inline generator(generator && rhs)
^
72 | inline generator(generator && rhs)
| ^
.tmp.cpp:412:26: error: object of type 'generator' cannot be assigned because its copy assignment operator is implicitly deleted
__f->__suspend_60_24 = simpleReturn(__f->v);
^
412 | __f->__suspend_60_24 = simpleReturn(__f->v);
| ^
.tmp.cpp:72:10: note: copy assignment operator is implicitly deleted because 'generator' has a user-declared move constructor
inline generator(generator && rhs)
^
72 | inline generator(generator && rhs)
| ^
.tmp.cpp:423:26: error: object of type 'generator' cannot be assigned because its copy assignment operator is implicitly deleted
__f->__suspend_60_51 = simpleReturn(__f->v + 1);
^
423 | __f->__suspend_60_51 = simpleReturn(__f->v + 1);
| ^
.tmp.cpp:72:10: note: copy assignment operator is implicitly deleted because 'generator' has a user-declared move constructor
inline generator(generator && rhs)
^
72 | inline generator(generator && rhs)
| ^
.tmp.cpp:434:26: error: object of type 'generator' cannot be assigned because its copy assignment operator is implicitly deleted
__f->__suspend_60_80 = simpleReturn(__f->v + 2);
^
434 | __f->__suspend_60_80 = simpleReturn(__f->v + 2);
| ^
.tmp.cpp:72:10: note: copy assignment operator is implicitly deleted because 'generator' has a user-declared move constructor
inline generator(generator && rhs)
^
72 | inline generator(generator && rhs)
| ^
.tmp.cpp:553:26: error: object of type 'generator' cannot be assigned because its copy assignment operator is implicitly deleted
__f->__suspend_67_24 = simpleReturn(__f->v);
^
553 | __f->__suspend_67_24 = simpleReturn(__f->v);
| ^
.tmp.cpp:72:10: note: copy assignment operator is implicitly deleted because 'generator' has a user-declared move constructor
inline generator(generator && rhs)
^
72 | inline generator(generator && rhs)
| ^
.tmp.cpp:564:26: error: object of type 'generator' cannot be assigned because its copy assignment operator is implicitly deleted
__f->__suspend_67_51 = simpleReturn(__f->v + 1);
^
564 | __f->__suspend_67_51 = simpleReturn(__f->v + 1);
| ^
.tmp.cpp:72:10: note: copy assignment operator is implicitly deleted because 'generator' has a user-declared move constructor
inline generator(generator && rhs)
^
72 | inline generator(generator && rhs)
| ^
7 errors generated.
8 changes: 4 additions & 4 deletions tests/ExpectFail_InvalidSourceRangeForAfterTokenTest.cerr
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
.tmp:4:27: error: 'decltype(auto)' can only be used as a return type in a function declaration
decltype(auto) (Foo::*bar)();
^
4 | decltype(auto) (Foo::*bar)();
| ^
.tmp:4:23: error: declaration of variable 'bar' with deduced type 'decltype(auto) (Foo::*)()' requires an initializer
decltype(auto) (Foo::*bar)();
^
4 | decltype(auto) (Foo::*bar)();
| ^
2 errors generated.

Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,4 @@ struct Foo
using MemberVarPtr_4 = decltype(auto) (Foo::*)();
MemberVarPtr_4 bar;

decltype(auto) (Foo::*bar)();

7 changes: 7 additions & 0 deletions tests/FieldDeclArrayRef2Test.cpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#if 0
template <typename T, unsigned int SIZE>
class array
{
Expand All @@ -12,3 +13,9 @@ int main()
{
array<int, 2> a;
}
#else
int main()
{
// disabled due to ICE in Clang 17
}
#endif
Loading

0 comments on commit 20cc2a9

Please sign in to comment.