Skip to content

Commit 4bd572b

Browse files
Updated clang toolset to version 19 (#60)
CMake presets for Boost, AWS SDK C++ and the main projects now use 'clang-19'. GitHub Actions scripts now use 'clang19_xxx' presets instead of 'clang1_xxx'. Clang Format and Clang Tidy invocations in GitHub Actions scripts changed to version 19. Fixed new clang-19-specific Clang Tidy warnings in the source code. Verified that "-stdlib=libc++ -fsanitize=address" alloc-dealloc-mismatch issue (llvm/llvm-project#59432) still exists in Clang 19 - updated TODO item to try again in Clang 20.
1 parent 5df43e4 commit 4bd572b

11 files changed

Lines changed: 59 additions & 53 deletions

File tree

.github/workflows/cmake.yml

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -38,14 +38,14 @@ jobs:
3838
- name: Install dependencies on ubuntu
3939
run: |
4040
sudo apt-get update
41-
sudo apt-get install clang-format-18
41+
sudo apt-get install clang-format-19
4242
4343
- name: Info Clang Format
44-
run: clang-format-18 --version
44+
run: clang-format-19 --version
4545

46-
- name: Check formatting with git clang-format-18
46+
- name: Check formatting with git clang-format-19
4747
working-directory: ${{github.workspace}}/src
48-
run: git clang-format-18 --diff --binary=clang-format-18 HEAD~
48+
run: git clang-format-19 --diff --binary=clang-format-19 HEAD~
4949

5050
build:
5151
# The CMake configure and build commands are platform agnostic and should work equally well on Windows or Mac.
@@ -74,24 +74,24 @@ jobs:
7474
mtr_options: "--sanitize"
7575
}
7676
- {
77-
name: "Clang 18 Debug",
78-
label: "debug_clang18",
77+
name: "Clang 19 Debug",
78+
label: "debug_clang19",
7979
run_clang_tidy: true
8080
}
8181
- {
82-
name: "Clang 18 RelWithDebInfo",
83-
label: "release_clang18",
82+
name: "Clang 19 RelWithDebInfo",
83+
label: "release_clang19",
8484
run_clang_tidy: true
8585
}
8686
- {
87-
name: "Clang 18 ASan",
88-
label: "asan_clang18"
89-
# TODO: re-enable running MTR under "Clang 18 ASan"
87+
name: "Clang 19 ASan",
88+
label: "asan_clang19"
89+
# TODO: re-enable running MTR under this "Clang XX ASan"
9090
# run_mtr: true,
9191
# mtr_options: "--sanitize"
9292
# when "-stdlib=libc++ -fsanitize=address" alloc-dealloc-mismatch issue is fixed
9393
# (https://github.com/llvm/llvm-project/issues/59432)
94-
# or CI is upgraded to Clang 19
94+
# or CI is upgraded to Clang 20
9595
}
9696

9797
steps:
@@ -127,7 +127,7 @@ jobs:
127127
if: startsWith(matrix.config.name, 'Clang')
128128
run: |
129129
sudo apt-get update
130-
sudo apt-get install clang-18 lld-18 clang-tidy-18 libc++-18-dev libc++1-18 libc++abi-18-dev libc++abi1-18
130+
sudo apt-get install clang-19 lld-19 clang-tidy-19 libc++-19-dev libc++abi-19-dev
131131
132132
- name: Install GCC dependencies on ubuntu
133133
if: startsWith(matrix.config.name, 'GCC')
@@ -234,12 +234,12 @@ jobs:
234234

235235
- name: Info Clang Tidy
236236
if: matrix.config.run_clang_tidy
237-
run: clang-tidy-18 --version
237+
run: clang-tidy-19 --version
238238

239239
- name: Clang Tidy
240240
if: matrix.config.run_clang_tidy
241241
# Run Clang Tidy
242-
run: run-clang-tidy-18 -header-filter=.* -j=${{steps.cpu-cores.outputs.count}} -use-color -p=${{github.workspace}}/src-build-${{matrix.config.label}}
242+
run: run-clang-tidy-19 -header-filter=.* -j=${{steps.cpu-cores.outputs.count}} -use-color -p=${{github.workspace}}/src-build-${{matrix.config.label}}
243243

244244
- name: MTR tests
245245
if: matrix.config.run_mtr

CMakePresets.json

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -51,11 +51,11 @@
5151
}
5252
},
5353
{
54-
"name": "clang18_hidden",
54+
"name": "clang19_hidden",
5555
"hidden": true,
5656
"cacheVariables": {
57-
"CMAKE_C_COMPILER": "clang-18",
58-
"CMAKE_CXX_COMPILER": "clang++-18",
57+
"CMAKE_C_COMPILER": "clang-19",
58+
"CMAKE_CXX_COMPILER": "clang++-19",
5959
"WITH_STDLIB_LIBCXX": "ON"
6060
}
6161
},
@@ -89,31 +89,31 @@
8989
},
9090

9191
{
92-
"name": "debug_clang18",
92+
"name": "debug_clang19",
9393
"inherits": [
9494
"common_hidden",
9595
"debug_hidden",
96-
"clang18_hidden"
96+
"clang19_hidden"
9797
],
98-
"displayName": "Clang 18 Debug"
98+
"displayName": "Clang 19 Debug"
9999
},
100100
{
101-
"name": "release_clang18",
101+
"name": "release_clang19",
102102
"inherits": [
103103
"common_hidden",
104104
"release_hidden",
105-
"clang18_hidden"
105+
"clang19_hidden"
106106
],
107-
"displayName": "Clang 18 RelWithDebInfo"
107+
"displayName": "Clang 19 RelWithDebInfo"
108108
},
109109
{
110-
"name": "asan_clang18",
110+
"name": "asan_clang19",
111111
"inherits": [
112112
"common_hidden",
113113
"asan_hidden",
114-
"clang18_hidden"
114+
"clang19_hidden"
115115
],
116-
"displayName": "Clang 18 ASan"
116+
"displayName": "Clang 19 ASan"
117117
}
118118
]
119119
}

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ Currently prebuilt binaries are not available.
1515
#### Dependencies
1616

1717
- [CMake](https://cmake.org/) 3.20.0+
18-
- [Clang](https://clang.llvm.org/) (`clang-15` .. `clang-18`) or [GCC](https://gcc.gnu.org/) (`gcc-12` .. `gcc-14`)
18+
- [Clang](https://clang.llvm.org/) (`clang-15` .. `clang-19`) or [GCC](https://gcc.gnu.org/) (`gcc-12` .. `gcc-14`)
1919
- [Boost libraries](https://www.boost.org/) 1.88.0 (git version, not the source tarball)
2020
- [MySQL client library](https://dev.mysql.com/doc/c-api/8.0/en/) 8.0.x (`libmysqlclient`)
2121
- [CURL library](https://curl.se/libcurl/) (`libcurl`) 8.6.0+
@@ -44,7 +44,7 @@ Define `BUILD_PRESET` depending on whether you want to build in `Debug`, `Releas
4444
export BUILD_PRESET=<configuration>_<toolset>
4545
```
4646
The supported values for `<configuration>` are `debug`, `release`, and `asan`.
47-
The supported values for `<toolset>` are `gcc13` and `clang18`.
47+
The supported values for `<toolset>` are `gcc13` and `clang19`.
4848

4949
For instance, if you want to build in `RelWithDebInfo` configuration using `GCC 13`, please specify
5050
```bash

extra/cmake_presets/aws-sdk-cpp/CMakePresets.json

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -55,11 +55,11 @@
5555
}
5656
},
5757
{
58-
"name": "clang18_hidden",
58+
"name": "clang19_hidden",
5959
"hidden": true,
6060
"cacheVariables": {
61-
"CMAKE_C_COMPILER": "clang-18",
62-
"CMAKE_CXX_COMPILER": "clang++-18",
61+
"CMAKE_C_COMPILER": "clang-19",
62+
"CMAKE_CXX_COMPILER": "clang++-19",
6363
"CMAKE_CXX_FLAGS_INIT": "-stdlib=libc++"
6464
}
6565
},
@@ -93,31 +93,31 @@
9393
},
9494

9595
{
96-
"name": "debug_clang18",
96+
"name": "debug_clang19",
9797
"inherits": [
9898
"common_hidden",
9999
"debug_hidden",
100-
"clang18_hidden"
100+
"clang19_hidden"
101101
],
102-
"displayName": "Clang 18 Debug"
102+
"displayName": "Clang 19 Debug"
103103
},
104104
{
105-
"name": "release_clang18",
105+
"name": "release_clang19",
106106
"inherits": [
107107
"common_hidden",
108108
"release_hidden",
109-
"clang18_hidden"
109+
"clang19_hidden"
110110
],
111-
"displayName": "Clang 18 RelWithDebInfo"
111+
"displayName": "Clang 19 RelWithDebInfo"
112112
},
113113
{
114-
"name": "asan_clang18",
114+
"name": "asan_clang19",
115115
"inherits": [
116116
"common_hidden",
117117
"asan_hidden",
118-
"clang18_hidden"
118+
"clang19_hidden"
119119
],
120-
"displayName": "Clang 18 ASan"
120+
"displayName": "Clang 19 ASan"
121121
}
122122
]
123123
}

extra/cmake_presets/boost/CMakePresets.json

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -53,11 +53,11 @@
5353
}
5454
},
5555
{
56-
"name": "clang18_hidden",
56+
"name": "clang19_hidden",
5757
"hidden": true,
5858
"cacheVariables": {
59-
"CMAKE_C_COMPILER": "clang-18",
60-
"CMAKE_CXX_COMPILER": "clang++-18"
59+
"CMAKE_C_COMPILER": "clang-19",
60+
"CMAKE_CXX_COMPILER": "clang++-19"
6161
},
6262
"environment": {
6363
"STDLIB_FLAGS": "-stdlib=libc++"
@@ -93,31 +93,31 @@
9393
},
9494

9595
{
96-
"name": "debug_clang18",
96+
"name": "debug_clang19",
9797
"inherits": [
9898
"common_hidden",
9999
"debug_hidden",
100-
"clang18_hidden"
100+
"clang19_hidden"
101101
],
102-
"displayName": "Clang 18 Debug"
102+
"displayName": "Clang 19 Debug"
103103
},
104104
{
105-
"name": "release_clang18",
105+
"name": "release_clang19",
106106
"inherits": [
107107
"common_hidden",
108108
"release_hidden",
109-
"clang18_hidden"
109+
"clang19_hidden"
110110
],
111-
"displayName": "Clang 18 RelWithDebInfo"
111+
"displayName": "Clang 19 RelWithDebInfo"
112112
},
113113
{
114-
"name": "asan_clang18",
114+
"name": "asan_clang19",
115115
"inherits": [
116116
"common_hidden",
117117
"asan_hidden",
118-
"clang18_hidden"
118+
"clang19_hidden"
119119
],
120-
"displayName": "Clang 18 ASan"
120+
"displayName": "Clang 19 ASan"
121121
}
122122
]
123123
}

src/binsrv/event/checksum_algorithm_type.hpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ namespace binsrv::event {
3535
// clang-format on
3636

3737
#define BINSRV_CHECKSUM_ALGORITHM_TYPE_XY_MACRO(X, Y) X = Y
38+
// NOLINTNEXTLINE(readability-enum-initial-value,cert-int09-c)
3839
enum class checksum_algorithm_type : std::uint8_t {
3940
BINSRV_CHECKSUM_ALGORITHM_TYPE_XY_SEQUENCE(),
4041
delimiter

src/binsrv/event/checksum_algorithm_type_fwd.hpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020

2121
namespace binsrv::event {
2222

23+
// NOLINTNEXTLINE(readability-enum-initial-value,cert-int09-c)
2324
enum class checksum_algorithm_type : std::uint8_t;
2425

2526
} // namespace binsrv::event

src/binsrv/event/code_type.hpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ namespace binsrv::event {
6868
// clang-format on
6969

7070
#define BINSRV_EVENT_CODE_TYPE_XY_MACRO(X, Y) X = Y
71+
// NOLINTNEXTLINE(readability-enum-initial-value,cert-int09-c)
7172
enum class code_type : std::uint8_t {
7273
BINSRV_EVENT_CODE_TYPE_XY_SEQUENCE(),
7374
delimiter

src/binsrv/event/code_type_fwd.hpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020

2121
namespace binsrv::event {
2222

23+
// NOLINTNEXTLINE(readability-enum-initial-value,cert-int09-c)
2324
enum class code_type : std::uint8_t;
2425

2526
} // namespace binsrv::event

src/binsrv/event/flag_type.hpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ namespace binsrv::event {
5050
// clang-format on
5151

5252
#define BINSRV_EVENT_FLAG_TYPE_XY_MACRO(X, Y) X = Y
53+
// NOLINTNEXTLINE(readability-enum-initial-value,cert-int09-c)
5354
enum class flag_type : std::uint16_t {
5455
BINSRV_EVENT_FLAG_TYPE_XY_SEQUENCE(),
5556
delimiter

0 commit comments

Comments
 (0)