Skip to content

Commit e89b6ba

Browse files
authored
CI Add Clang-18 C++23 regression tests (#1154)
* CI Update run_tests.sh * CI Add clang-18 C++23 regression tests
1 parent d7b9130 commit e89b6ba

File tree

255 files changed

+671
-1
lines changed

Some content is hidden

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

255 files changed

+671
-1
lines changed

.github/workflows/build-cppfront.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ jobs:
5252
cxx-std: 'c++20'
5353
- runs-on: ubuntu-24.04
5454
compiler: clang++-18
55-
cxx-std: 'c++2b'
55+
cxx-std: 'c++23'
5656
- runs-on: ubuntu-24.04
5757
compiler: g++-14
5858
cxx-std: 'c++2b'

.github/workflows/regression-tests.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,11 @@ jobs:
3535
compiler: clang++-18
3636
cxx_std: c++20
3737
stdlib: libstdc++
38+
- os: ubuntu-24.04
39+
shortosname: ubu-24
40+
compiler: clang++-18
41+
cxx_std: c++23
42+
stdlib: libc++-18-dev
3843
- os: ubuntu-22.04
3944
shortosname: ubu-22
4045
compiler: clang++-15

regression-tests/run-tests.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,11 @@ if [ -z "$cxx_compiler" ]; then
116116
usage
117117
fi
118118

119+
if [ -z "$label" ]; then
120+
echo "Run label not specified"
121+
usage
122+
fi
123+
119124
tests=$(ls | grep ".cpp2$")
120125
if [[ -n "$chosen_tests" ]]; then
121126
for test in $chosen_tests; do
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
Ubuntu clang version 18.1.3 (1)
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-18-c++23-libcpp/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-18-c++23-libcpp/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-18-c++23-libcpp/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-18-c++23-libcpp/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-18-c++23-libcpp/mixed-bounds-safety-with-assert.cpp.output

Whitespace-only changes.

regression-tests/test-results/clang-18-c++23-libcpp/mixed-bugfix-for-cpp2-comment-cpp1-sequence.cpp.execution

Whitespace-only changes.

regression-tests/test-results/clang-18-c++23-libcpp/mixed-bugfix-for-cpp2-comment-cpp1-sequence.cpp.output

Whitespace-only changes.

regression-tests/test-results/clang-18-c++23-libcpp/mixed-bugfix-for-literal-as-nttp.cpp.execution

Whitespace-only changes.

regression-tests/test-results/clang-18-c++23-libcpp/mixed-bugfix-for-literal-as-nttp.cpp.output

Whitespace-only changes.

regression-tests/test-results/clang-18-c++23-libcpp/mixed-bugfix-for-ufcs-non-local.cpp copy.execution

Whitespace-only changes.

regression-tests/test-results/clang-18-c++23-libcpp/mixed-bugfix-for-ufcs-non-local.cpp copy.output

Whitespace-only changes.

regression-tests/test-results/clang-18-c++23-libcpp/mixed-bugfix-for-ufcs-non-local.cpp.execution

Whitespace-only changes.

regression-tests/test-results/clang-18-c++23-libcpp/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-18-c++23-libcpp/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+
1 "test"
2+
0 ""
3+
1 "test"
4+
0 ""

regression-tests/test-results/clang-18-c++23-libcpp/mixed-default-arguments.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-18-c++23-libcpp/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-18-c++23-libcpp/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-18-c++23-libcpp/mixed-forwarding.cpp.output

Whitespace-only changes.
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-18-c++23-libcpp/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-18-c++23-libcpp/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-18-c++23-libcpp/mixed-function-expression-and-std-ranges-for-each.cpp.output

Whitespace-only changes.
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-18-c++23-libcpp/mixed-function-expression-with-pointer-capture.cpp.output

Whitespace-only changes.
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-18-c++23-libcpp/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-18-c++23-libcpp/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-18-c++23-libcpp/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-18-c++23-libcpp/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-18-c++23-libcpp/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-18-c++23-libcpp/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-18-c++23-libcpp/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+
(no match)

regression-tests/test-results/clang-18-c++23-libcpp/mixed-inspect-values.cpp.output

Whitespace-only changes.

regression-tests/test-results/clang-18-c++23-libcpp/mixed-inspect-with-typeof-of-template-arg-list.cpp.execution

Whitespace-only changes.

regression-tests/test-results/clang-18-c++23-libcpp/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-18-c++23-libcpp/mixed-intro-example-three-loops.cpp.output

Whitespace-only changes.
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-18-c++23-libcpp/mixed-intro-for-with-counter-include-last.cpp.output

Whitespace-only changes.
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-18-c++23-libcpp/mixed-lifetime-safety-and-null-contracts.cpp.output

Whitespace-only changes.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
>> 42

regression-tests/test-results/clang-18-c++23-libcpp/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-18-c++23-libcpp/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-18-c++23-libcpp/mixed-out-destruction.cpp.output

Whitespace-only changes.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
42
2+
exxxx

regression-tests/test-results/clang-18-c++23-libcpp/mixed-parameter-passing-generic-out.cpp.output

Whitespace-only changes.

regression-tests/test-results/clang-18-c++23-libcpp/mixed-parameter-passing-with-forward.cpp.execution

Whitespace-only changes.

regression-tests/test-results/clang-18-c++23-libcpp/mixed-parameter-passing-with-forward.cpp.output

Whitespace-only changes.

regression-tests/test-results/clang-18-c++23-libcpp/mixed-parameter-passing.cpp.execution

Whitespace-only changes.

regression-tests/test-results/clang-18-c++23-libcpp/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-18-c++23-libcpp/mixed-postexpression-with-capture.cpp.output

Whitespace-only changes.

regression-tests/test-results/clang-18-c++23-libcpp/mixed-postfix-expression-custom-formatting.cpp.execution

Whitespace-only changes.

regression-tests/test-results/clang-18-c++23-libcpp/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-18-c++23-libcpp/mixed-string-interpolation.cpp.output

Whitespace-only changes.
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
11
2+
12
3+
13*14 is 182

regression-tests/test-results/clang-18-c++23-libcpp/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-18-c++23-libcpp/mixed-type-safety-1.cpp.output

Whitespace-only changes.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
rain
2+
rain

regression-tests/test-results/clang-18-c++23-libcpp/mixed-ufcs-multiple-template-arguments.cpp.output

Whitespace-only changes.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Null safety violation: std::expected has an unexpected value

regression-tests/test-results/clang-18-c++23-libcpp/pure2-assert-expected-not-null.cpp.output

Whitespace-only changes.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Null safety violation: std::optional does not contain a value

regression-tests/test-results/clang-18-c++23-libcpp/pure2-assert-optional-not-null.cpp.output

Whitespace-only changes.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Null safety violation: std::shared_ptr is empty

regression-tests/test-results/clang-18-c++23-libcpp/pure2-assert-shared-ptr-not-null.cpp.output

Whitespace-only changes.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Null safety violation: std::unique_ptr is empty

regression-tests/test-results/clang-18-c++23-libcpp/pure2-assert-unique-ptr-not-null.cpp.output

Whitespace-only changes.
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
>> decorated
2+
>> hello
3+
>> world

regression-tests/test-results/clang-18-c++23-libcpp/pure2-bounds-safety-span.cpp.output

Whitespace-only changes.
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
while_continue_inner:
2+
00 inner 01 02 inner outer 10 inner 11 12 inner outer 20 inner 21 22 inner outer
3+
while_continue_outer:
4+
00 inner 01 10 inner 11 20 inner 21
5+
while_break_inner:
6+
00 inner 01 outer 10 inner 11 outer 20 inner 21 outer
7+
while_break_outer:
8+
00 inner 01
9+
10+
do_continue_inner:
11+
00 inner 01 02 inner outer 10 inner 11 12 inner outer 20 inner 21 22 inner outer
12+
do_continue_outer:
13+
00 inner 01 10 inner 11 20 inner 21
14+
do_break_inner:
15+
00 inner 01 outer 10 inner 11 outer 20 inner 21 outer
16+
do_break_outer:
17+
00 inner 01
18+
19+
for_continue_inner:
20+
00 inner 01 02 inner outer 10 inner 11 12 inner outer 20 inner 21 22 inner outer
21+
for_continue_outer:
22+
00 inner 01 10 inner 11 20 inner 21
23+
for_break_inner:
24+
00 inner 01 outer 10 inner 11 outer 20 inner 21 outer
25+
for_break_outer:
26+
00 inner 01

regression-tests/test-results/clang-18-c++23-libcpp/pure2-break-continue.cpp.output

Whitespace-only changes.

regression-tests/test-results/clang-18-c++23-libcpp/pure2-bugfix-for-assign-expression-list.cpp.execution

Whitespace-only changes.

regression-tests/test-results/clang-18-c++23-libcpp/pure2-bugfix-for-assign-expression-list.cpp.output

Whitespace-only changes.

regression-tests/test-results/clang-18-c++23-libcpp/pure2-bugfix-for-discard-precedence.cpp.execution

Whitespace-only changes.

regression-tests/test-results/clang-18-c++23-libcpp/pure2-bugfix-for-discard-precedence.cpp.output

Whitespace-only changes.

regression-tests/test-results/clang-18-c++23-libcpp/pure2-bugfix-for-indexed-call.cpp.execution

Whitespace-only changes.

regression-tests/test-results/clang-18-c++23-libcpp/pure2-bugfix-for-indexed-call.cpp.output

Whitespace-only changes.

regression-tests/test-results/clang-18-c++23-libcpp/pure2-bugfix-for-max-munch.cpp.execution

Whitespace-only changes.

regression-tests/test-results/clang-18-c++23-libcpp/pure2-bugfix-for-max-munch.cpp.output

Whitespace-only changes.

0 commit comments

Comments
 (0)