Skip to content

Commit f0018d7

Browse files
authored
CI: Add Clang 15 support in regression tests (#974)
* CI: Add Clang 15 support in regression tests * CI: Select Xcode 14 on MacOS
1 parent d97552a commit f0018d7

File tree

233 files changed

+681
-20
lines changed

Some content is hidden

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

233 files changed

+681
-20
lines changed

.github/workflows/regression-tests.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,18 +17,26 @@ jobs:
1717
fail-fast: false
1818
matrix:
1919
os: [ubuntu-latest]
20-
compiler: [g++-10, g++-13]
20+
compiler: [g++-10, g++-13, clang++-15]
2121
include:
2222
- os: ubuntu-20.04
2323
compiler: clang++-12
2424
- os: macos-13
2525
compiler: clang++
26+
- os: macos-13
27+
compiler: clang++-15
2628
- os: windows-latest
2729
compiler: cl.exe
2830
steps:
2931
- name: Checkout repo
3032
uses: actions/checkout@v4
3133

34+
- name: Prepare compilers
35+
if: matrix.os == 'macos-13'
36+
run: |
37+
sudo xcode-select --switch /Applications/Xcode_14.3.1.app
38+
sudo ln -s "$(brew --prefix llvm@15)/bin/clang" /usr/local/bin/clang++-15
39+
3240
- name: Run regression tests - Linux and macOS version
3341
if: startsWith(matrix.os, 'ubuntu') || matrix.os == 'macos-13'
3442
run: |

regression-tests/run-tests.sh

Lines changed: 17 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -129,31 +129,39 @@ if [[ "$cxx_compiler" == *"cl.exe"* ]]; then
129129
exec_out_dir="$expected_results_dir/msvc-2022"
130130
compiler_version=$(cl.exe)
131131
else
132-
compiler_cmd="$cxx_compiler -I../../../include -std=c++20 -pthread -o "
133-
compiler_version=$("$cxx_compiler" --version)
134-
135-
# We don't currently support Apple Clang 15 so try and switch to 14
136-
if [[ "$compiler_version" == *"Apple clang version 15.0"* ]]; then
137-
printf "Found Apple Clang 15, attempting to switch to Apple Clang 14"
138-
cxx_compiler=$(xcodebuild -find clang++)
139-
compiler_version=$("$cxx_compiler" --version)
132+
# Verify the compiler command
133+
which "$cxx_compiler" > /dev/null
134+
if [[ $? != 0 ]]; then
135+
printf "The compiler '$cxx_compiler' is not installed\n\n"
136+
exit 2
140137
fi
141138

142-
if [[ "$compiler_version" == *"Apple clang version 14.0"* ]]; then
139+
cpp_std=c++2b
140+
compiler_version=$("$cxx_compiler" --version)
141+
142+
if [[ "$compiler_version" == *"Apple clang version 14.0"* ||
143+
"$compiler_version" == *"Homebrew clang version 15.0"* ]]; then
143144
exec_out_dir="$expected_results_dir/apple-clang-14"
144145
elif [[ "$compiler_version" == *"clang version 12.0"* ]]; then
145146
exec_out_dir="$expected_results_dir/clang-12"
146147
elif [[ "$compiler_version" == *"clang version 15.0"* ]]; then
147148
exec_out_dir="$expected_results_dir/clang-15"
149+
# c++2b causes starge issues on GitHub ubuntu-latest runner
150+
cpp_std="c++20"
148151
elif [[ "$compiler_version" == *"g++-10"* ]]; then
149152
exec_out_dir="$expected_results_dir/gcc-10"
153+
# GCC 10 does not support c++2b
154+
cpp_std=c++20
150155
elif [[ "$compiler_version" == *"g++-12"* ||
151156
"$compiler_version" == *"g++-13"*
152157
]]; then
153158
exec_out_dir="$expected_results_dir/gcc-13"
154159
else
155160
printf "Unhandled compiler version:\n$compiler_version\n\n"
161+
exit 2
156162
fi
163+
164+
compiler_cmd="$cxx_compiler -I../../../include -std=$cpp_std -pthread -o "
157165
fi
158166

159167
if [[ -d "$exec_out_dir" ]]; then
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
Ubuntu clang version 15.0.7
2+
Target: x86_64-pc-linux-gnu
3+
Thread model: posix
4+
InstalledDir: /usr/bin
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Hello world

regression-tests/test-results/clang-15/mixed-allcpp1-hello.cpp.output

Whitespace-only changes.
Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
v as X< 0> = 0
2+
v as X< 1> = 1
3+
v as X< 2> = 2
4+
v as X< 3> = 3
5+
v as X< 4> = 4
6+
v as X< 5> = 5
7+
v as X< 6> = 6
8+
v as X< 7> = 7
9+
v as X< 8> = 8
10+
v as X< 9> = 9
11+
v as X<10> = 10
12+
v as X<11> = 11
13+
v as X<12> = 12
14+
v as X<13> = 13
15+
v as X<14> = 14
16+
v as X<15> = 15
17+
v as X<16> = 16
18+
v as X<17> = 17
19+
v as X<18> = 18
20+
v as X<19> = 19
21+
as_const(v) as X< 0> = 0
22+
as_const(v) as X< 1> = 1
23+
as_const(v) as X< 2> = 2
24+
as_const(v) as X< 3> = 3
25+
as_const(v) as X< 4> = 4
26+
as_const(v) as X< 5> = 5
27+
as_const(v) as X< 6> = 6
28+
as_const(v) as X< 7> = 7
29+
as_const(v) as X< 8> = 8
30+
as_const(v) as X< 9> = 9
31+
as_const(v) as X<10> = 10
32+
as_const(v) as X<11> = 11
33+
as_const(v) as X<12> = 12
34+
as_const(v) as X<13> = 13
35+
as_const(v) as X<14> = 14
36+
as_const(v) as X<15> = 15
37+
as_const(v) as X<16> = 16
38+
as_const(v) as X<17> = 17
39+
as_const(v) as X<18> = 18
40+
as_const(v) as X<19> = 19
41+
move(v) as X< 0> = 0
42+
move(v) as X< 1> = 1
43+
move(v) as X< 2> = 2
44+
move(v) as X< 3> = 3
45+
move(v) as X< 4> = 4
46+
move(v) as X< 5> = 5
47+
move(v) as X< 6> = 6
48+
move(v) as X< 7> = 7
49+
move(v) as X< 8> = 8
50+
move(v) as X< 9> = 9
51+
move(v) as X<10> = 10
52+
move(v) as X<11> = 11
53+
move(v) as X<12> = 12
54+
move(v) as X<13> = 13
55+
move(v) as X<14> = 14
56+
move(v) as X<15> = 15
57+
move(v) as X<16> = 16
58+
move(v) as X<17> = 17
59+
move(v) as X<18> = 18
60+
move(v) as X<19> = 19

regression-tests/test-results/clang-15/mixed-as-for-variant-20-types.cpp.output

Whitespace-only changes.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Bounds safety violation: out of bounds access attempt detected - attempted access at index 5, [min,max] range is [0,4]

regression-tests/test-results/clang-15/mixed-bounds-check.cpp.output

Whitespace-only changes.
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
1
2+
44
3+
45
4+
46
5+
5

regression-tests/test-results/clang-15/mixed-bounds-safety-with-assert-2.cpp.output

Whitespace-only changes.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Bounds safety violation

regression-tests/test-results/clang-15/mixed-bounds-safety-with-assert.cpp.output

Whitespace-only changes.

regression-tests/test-results/clang-15/mixed-bugfix-for-cpp2-comment-cpp1-sequence.cpp.execution

Whitespace-only changes.

regression-tests/test-results/clang-15/mixed-bugfix-for-cpp2-comment-cpp1-sequence.cpp.output

Whitespace-only changes.

regression-tests/test-results/clang-15/mixed-bugfix-for-literal-as-nttp.cpp.execution

Whitespace-only changes.

regression-tests/test-results/clang-15/mixed-bugfix-for-literal-as-nttp.cpp.output

Whitespace-only changes.

regression-tests/test-results/clang-15/mixed-bugfix-for-ufcs-non-local.cpp.execution

Whitespace-only changes.

regression-tests/test-results/clang-15/mixed-bugfix-for-ufcs-non-local.cpp.output

Whitespace-only changes.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
hello
2+
2022
3+
hello-ish
4+
2022-ish

regression-tests/test-results/clang-15/mixed-captures-in-expressions-and-postconditions.cpp.output

Whitespace-only changes.
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
true
2+
false
3+
"test.exe"
4+
true

regression-tests/test-results/clang-15/mixed-fixed-type-aliases.cpp.output

Whitespace-only changes.
Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
123
2+
123
3+
123
4+
123
5+
123
6+
123
7+
123456
8+
123
9+
123
10+
123
11+
123
12+
123
13+
123
14+
123456
15+
123456
16+
123456
17+
456
18+
456
19+
1e+10
20+
1e+10
21+
1e-10
22+
1e-10
23+
1e-10
24+
1e-10
25+
1e-10
26+
1e-10
27+
1e-10
28+
123456
29+
123456
30+
456
31+
456
32+
1e+10
33+
1e+10
34+
1e-10
35+
1e-10
36+
1e-10
37+
1e-10
38+
1e-10
39+
1e-10
40+
1e-10
41+
123
42+
123
43+
123
44+
123
45+
123
46+
123
47+
123456
48+
123
49+
123
50+
123
51+
123
52+
123
53+
123
54+
123456
55+
123456
56+
456
57+
1e+10
58+
1e+10
59+
1e-10
60+
1e-10
61+
1e-10
62+
1e-10
63+
1e-10
64+
123456
65+
456
66+
1e+10
67+
1e+10
68+
1e-10
69+
1e-10
70+
1e-10
71+
1e-10
72+
1e-10

regression-tests/test-results/clang-15/mixed-float-literals.cpp.output

Whitespace-only changes.
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
+X 1
2+
+X 2
3+
copy X 1
4+
copy X 2
5+
copy X 1
6+
move X 2
7+
+X 3
8+
+X 4
9+
copy X 3
10+
copy X 4
11+
move X 3
12+
move X 4

regression-tests/test-results/clang-15/mixed-forwarding.cpp.output

Whitespace-only changes.
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
hello-ish maybe
2+
2022-ish maybe

regression-tests/test-results/clang-15/mixed-function-expression-and-std-for-each.cpp.output

Whitespace-only changes.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
hello
2+
2022
3+
hello-ish
4+
2022-ish

regression-tests/test-results/clang-15/mixed-function-expression-and-std-ranges-for-each-with-capture.cpp.output

Whitespace-only changes.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
hello
2+
2022
3+
hello-ish
4+
2022-ish

regression-tests/test-results/clang-15/mixed-function-expression-and-std-ranges-for-each.cpp.output

Whitespace-only changes.
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
2+
hello
3+
4+
2023
5+
hello-ish
6+
2023-ish

regression-tests/test-results/clang-15/mixed-function-expression-with-pointer-capture.cpp.output

Whitespace-only changes.
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
2+
hello
3+
4+
2022
5+
hello-ish
6+
2022-ish

regression-tests/test-results/clang-15/mixed-function-expression-with-repeated-capture.cpp.output

Whitespace-only changes.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Hello [world]

regression-tests/test-results/clang-15/mixed-hello.cpp.output

Whitespace-only changes.
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
12234
2+
12234

regression-tests/test-results/clang-15/mixed-increment-decrement.cpp.output

Whitespace-only changes.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Contract violation: fill: value must contain at least count elements

regression-tests/test-results/clang-15/mixed-initialization-safety-3-contract-violation.cpp.output

Whitespace-only changes.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
>> [xyzzy]

regression-tests/test-results/clang-15/mixed-initialization-safety-3.cpp.output

Whitespace-only changes.
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
inspected vec : std::vector
2+
inspected arr : std::array
3+
inspected var : std::variant
4+
inspected myt : my_type
5+
inspected vec : std::vector
6+
inspected arr : std::array
7+
inspected var : std::variant
8+
inspected myt : my_type

regression-tests/test-results/clang-15/mixed-inspect-templates.cpp.output

Whitespace-only changes.
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
i is between 11 and 20
2+
less than 20
3+
i is between 10 and 30
4+
v is empty
5+
v is empty

regression-tests/test-results/clang-15/mixed-inspect-values-2.cpp.output

Whitespace-only changes.
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
rev dodgson
2+
(no match)
3+
the answer
4+
zero
5+
plugh
6+
zero
7+
1 or 2
8+
1 or 2
9+
3
10+
integer -42
11+
xyzzy
12+
3

regression-tests/test-results/clang-15/mixed-inspect-values.cpp.output

Whitespace-only changes.

regression-tests/test-results/clang-15/mixed-inspect-with-typeof-of-template-arg-list.cpp.execution

Whitespace-only changes.

regression-tests/test-results/clang-15/mixed-inspect-with-typeof-of-template-arg-list.cpp.output

Whitespace-only changes.
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
>> hello
2+
>> big
3+
>> world
4+
** ** **
5+
>> [hello]
6+
>> [big]
7+
>> [world]

regression-tests/test-results/clang-15/mixed-intro-example-three-loops.cpp.output

Whitespace-only changes.
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
1 42
2+
2 84
3+
3 168
4+
4 336
5+
5 672

regression-tests/test-results/clang-15/mixed-intro-for-with-counter-include-last.cpp.output

Whitespace-only changes.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
sending error to my framework... [dynamic null dereference attempt detected]

regression-tests/test-results/clang-15/mixed-lifetime-safety-and-null-contracts.cpp.output

Whitespace-only changes.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
>> 42

regression-tests/test-results/clang-15/mixed-lifetime-safety-pointer-init-4.cpp.output

Whitespace-only changes.
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
a is 10
2+
b is xyzzy

regression-tests/test-results/clang-15/mixed-multiple-return-values.cpp.output

Whitespace-only changes.
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
enter main
2+
enter f00
3+
enter f01
4+
+X 1
5+
exit f01
6+
-X 1
7+
exit f00
8+
9+
enter f10
10+
enter f11
11+
enter f12
12+
enter f13
13+
enter f14
14+
+X 2
15+
exit f14
16+
exit f13
17+
exit f12
18+
-X 2
19+
exit f11
20+
exit f10
21+
exit main

regression-tests/test-results/clang-15/mixed-out-destruction.cpp.output

Whitespace-only changes.
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
42
2+
exxxx

regression-tests/test-results/clang-15/mixed-parameter-passing-generic-out.cpp.output

Whitespace-only changes.

regression-tests/test-results/clang-15/mixed-parameter-passing-with-forward.cpp.execution

Whitespace-only changes.

regression-tests/test-results/clang-15/mixed-parameter-passing-with-forward.cpp.output

Whitespace-only changes.

regression-tests/test-results/clang-15/mixed-parameter-passing.cpp.execution

Whitespace-only changes.

regression-tests/test-results/clang-15/mixed-parameter-passing.cpp.output

Whitespace-only changes.
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
xyzzy and plugh
2+
xyzzyplugh

regression-tests/test-results/clang-15/mixed-postexpression-with-capture.cpp.output

Whitespace-only changes.

regression-tests/test-results/clang-15/mixed-postfix-expression-custom-formatting.cpp.execution

Whitespace-only changes.

regression-tests/test-results/clang-15/mixed-postfix-expression-custom-formatting.cpp.output

Whitespace-only changes.
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
a = 2, b = (empty)
2+
a^2 + b = 46
3+
sv = my string_view
4+
osv = (empty)
5+
osv = string literal bound to optional string_view
6+
var = (empty)
7+
var = abracadabra
8+
var = 2.718280
9+
mypair = (12, 3.400000)
10+
tup1 = (12)
11+
tup2 = (12, 3.400000)
12+
tup3 = (12, 3.400000, 456)
13+
p = (first, (empty))
14+
t = (3.140000, (empty), (empty))
15+
vv = 0
16+
vv = (1, 2.300000)
17+
custom = (customize me - no cpp2::to_string overload exists for this type)

regression-tests/test-results/clang-15/mixed-string-interpolation.cpp.output

Whitespace-only changes.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
12

regression-tests/test-results/clang-15/mixed-test-parens.cpp.output

Whitespace-only changes.
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
1.1 is int? false
2+
1 is int? true
3+
4+
s* is Shape? true
5+
s* is Circle? true
6+
s* is Square? false

regression-tests/test-results/clang-15/mixed-type-safety-1.cpp.output

Whitespace-only changes.
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
rain
2+
rain

regression-tests/test-results/clang-15/mixed-ufcs-multiple-template-arguments.cpp.output

Whitespace-only changes.

0 commit comments

Comments
 (0)