Skip to content

Commit 5aa32ae

Browse files
authored
Make all the regression tests pass on CI (#1393)
* CI: Replace Clang-18 with CLang-19 * CI: Fix pure Cpp2 regression tests for MSVC
1 parent 7efa490 commit 5aa32ae

File tree

282 files changed

+306
-256
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

282 files changed

+306
-256
lines changed

.github/workflows/regression-tests.yml

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,12 @@ jobs:
2727
include:
2828
- os: ubuntu-24.04
2929
shortosname: ubu-24
30-
compiler: clang++-18
30+
compiler: clang++-19
3131
cxx_std: c++20
3232
stdlib: libstdc++
3333
- os: ubuntu-24.04
3434
shortosname: ubu-24
35-
compiler: clang++-18
35+
compiler: clang++-19
3636
cxx_std: c++23
3737
stdlib: libc++-18-dev
3838
- os: ubuntu-22.04
@@ -74,12 +74,17 @@ jobs:
7474
- name: Checkout repo
7575
uses: actions/checkout@v4
7676

77-
- name: Prepare compilers
77+
- name: Prepare compilers - macOS
7878
if: matrix.os == 'macos-13'
7979
run: |
8080
sudo xcode-select --switch /Applications/Xcode_14.3.1.app
8181
sudo ln -s "$(brew --prefix llvm@15)/bin/clang" /usr/local/bin/clang++-15
8282
83+
- name: Prepare compilers - Ubuntu 24.04
84+
if: matrix.os == 'ubuntu-24.04'
85+
run: |
86+
sudo sudo apt-get install clang-19
87+
8388
- name: Run regression tests - Linux and macOS version
8489
if: startsWith(matrix.os, 'ubuntu') || startsWith(matrix.os, 'macos')
8590
run: |

include/cpp2util.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -301,6 +301,12 @@
301301
#include <vector>
302302
#endif
303303

304+
// Required for pure Cpp2 tests to pass on MSVC
305+
// #include <cstdlib> causes C2995 of math tempaltes
306+
#ifndef EXIT_FAILURE
307+
#define EXIT_FAILURE 1
308+
#endif
309+
304310
// cpp2util.h uses signed integer types for indices and container sizes
305311
// so disable clang signed-to-unsigned conversion warnings in this header.
306312
#ifdef __clang__

regression-tests/run-tests.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -169,8 +169,8 @@ else
169169
exec_out_dir="$expected_results_dir/clang-12"
170170
elif [[ "$compiler_version" == *"clang version 15.0"* ]]; then
171171
exec_out_dir="$expected_results_dir/clang-15"
172-
elif [[ "$compiler_version" == *"clang version 18.1"* ]]; then
173-
exec_out_dir="$expected_results_dir/clang-18"
172+
elif [[ "$compiler_version" == *"clang version 19.1"* ]]; then
173+
exec_out_dir="$expected_results_dir/clang-19"
174174
elif [[ "$compiler_version" == *"g++-10"* ]]; then
175175
exec_out_dir="$expected_results_dir/gcc-10"
176176
elif [[ "$compiler_version" == *"g++-12"* ||
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
../../../include/cpp2util.h(1235) decltype(auto) cpp2::impl::assert_in_bounds(auto &&, std::source_location) [arg = 5, x:auto = std::vector<int>]: Bounds safety violation: out of bounds access attempt detected - attempted access at index 5, [min,max] range is [0,4]
1+
../../../include/cpp2util.h(1241) decltype(auto) cpp2::impl::assert_in_bounds(auto &&, std::source_location) [arg = 5, x:auto = std::vector<int>]: Bounds safety violation: out of bounds access attempt detected - attempted access at index 5, [min,max] range is [0,4]
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
../../../include/cpp2util.h(546) : Bounds safety violation
1+
../../../include/cpp2util.h(552) : Bounds safety violation
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
../../../include/cpp2util.h(546) : Contract violation: fill: value must contain at least count elements
1+
../../../include/cpp2util.h(552) : Contract violation: fill: value must contain at least count elements
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
sending error to my framework... [dynamic null dereference attempt detected]
2-
from source location: ../../../include/cpp2util.h(1126) decltype(auto) cpp2::impl::assert_not_null(auto &&, std::source_location) [arg:auto = int *&]
2+
from source location: ../../../include/cpp2util.h(1132) decltype(auto) cpp2::impl::assert_not_null(auto &&, std::source_location) [arg:auto = int *&]
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
../../../include/cpp2util.h(1126) decltype(auto) cpp2::impl::assert_not_null(auto &&, std::source_location) [arg:auto = std::expected<int, bool>]: Null safety violation: std::expected has an unexpected value
1+
../../../include/cpp2util.h(1132) decltype(auto) cpp2::impl::assert_not_null(auto &&, std::source_location) [arg:auto = std::expected<int, bool>]: Null safety violation: std::expected has an unexpected value
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
../../../include/cpp2util.h(1126) decltype(auto) cpp2::impl::assert_not_null(auto &&, std::source_location) [arg:auto = std::optional<int>]: Null safety violation: std::optional does not contain a value
1+
../../../include/cpp2util.h(1132) decltype(auto) cpp2::impl::assert_not_null(auto &&, std::source_location) [arg:auto = std::optional<int>]: Null safety violation: std::optional does not contain a value
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
../../../include/cpp2util.h(1126) decltype(auto) cpp2::impl::assert_not_null(auto &&, std::source_location) [arg:auto = std::shared_ptr<int>]: Null safety violation: std::shared_ptr is empty
1+
../../../include/cpp2util.h(1132) decltype(auto) cpp2::impl::assert_not_null(auto &&, std::source_location) [arg:auto = std::shared_ptr<int>]: Null safety violation: std::shared_ptr is empty
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
../../../include/cpp2util.h(1126) decltype(auto) cpp2::impl::assert_not_null(auto &&, std::source_location) [arg:auto = std::unique_ptr<int>]: Null safety violation: std::unique_ptr is empty
1+
../../../include/cpp2util.h(1132) decltype(auto) cpp2::impl::assert_not_null(auto &&, std::source_location) [arg:auto = std::unique_ptr<int>]: Null safety violation: std::unique_ptr is empty
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
../../../include/cpp2util.h(1235) decltype(auto) cpp2::impl::assert_in_bounds(auto &&, std::source_location) [arg = 5, x:auto = std::vector<int>]: Bounds safety violation: out of bounds access attempt detected - attempted access at index 5, [min,max] range is [0,4]
1+
../../../include/cpp2util.h(1241) decltype(auto) cpp2::impl::assert_in_bounds(auto &&, std::source_location) [arg = 5, x:auto = std::vector<int>]: Bounds safety violation: out of bounds access attempt detected - attempted access at index 5, [min,max] range is [0,4]
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
../../../include/cpp2util.h(546) : Bounds safety violation
1+
../../../include/cpp2util.h(552) : Bounds safety violation
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
../../../include/cpp2util.h(546) : Contract violation: fill: value must contain at least count elements
1+
../../../include/cpp2util.h(552) : Contract violation: fill: value must contain at least count elements
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
sending error to my framework... [dynamic null dereference attempt detected]
2-
from source location: ../../../include/cpp2util.h(1126) decltype(auto) cpp2::impl::assert_not_null(auto &&, std::source_location) [arg:auto = int *&]
2+
from source location: ../../../include/cpp2util.h(1132) decltype(auto) cpp2::impl::assert_not_null(auto &&, std::source_location) [arg:auto = int *&]
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
../../../include/cpp2util.h(1126) decltype(auto) cpp2::impl::assert_not_null(auto &&, std::source_location) [arg:auto = std::optional<int>]: Null safety violation: std::optional does not contain a value
1+
../../../include/cpp2util.h(1132) decltype(auto) cpp2::impl::assert_not_null(auto &&, std::source_location) [arg:auto = std::optional<int>]: Null safety violation: std::optional does not contain a value
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
../../../include/cpp2util.h(1126) decltype(auto) cpp2::impl::assert_not_null(auto &&, std::source_location) [arg:auto = std::shared_ptr<int>]: Null safety violation: std::shared_ptr is empty
1+
../../../include/cpp2util.h(1132) decltype(auto) cpp2::impl::assert_not_null(auto &&, std::source_location) [arg:auto = std::shared_ptr<int>]: Null safety violation: std::shared_ptr is empty
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
../../../include/cpp2util.h(1126) decltype(auto) cpp2::impl::assert_not_null(auto &&, std::source_location) [arg:auto = std::unique_ptr<int>]: Null safety violation: std::unique_ptr is empty
1+
../../../include/cpp2util.h(1132) decltype(auto) cpp2::impl::assert_not_null(auto &&, std::source_location) [arg:auto = std::unique_ptr<int>]: Null safety violation: std::unique_ptr is empty

0 commit comments

Comments
 (0)