Skip to content

Commit 1032a5b

Browse files
authored
CI Update tests - make all tests pass (#1324)
* CI Update regression tests * CI Include UFCS test compilation failures * CI Revert UFCS test restore for further investigation * CI update mixed-bugfix-for-ufcs-non-local.cpp2 results
1 parent ebfb7bc commit 1032a5b

File tree

55 files changed

+87
-99
lines changed

Some content is hidden

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

55 files changed

+87
-99
lines changed

Diff for: regression-tests/mixed-bugfix-for-ufcs-non-local.cpp2

+2-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,8 @@ d: _ == t<o.f()>(); // Fails on Clang 12 (lambda in unevaluated context).
3838

3939
u: @struct type = {
4040
b: bool == o.f();
41-
c: bool == :(forward x: decltype(o.f())) = x;(true); // Fails on Clang 12 (lambda in unevaluated context).
41+
// UFCS used in the decltype in the line below causes all compilers to report error/crash
42+
c: bool == :(forward x: decltype(f(o))) = x;(true); // Fails on Clang 12 (lambda in unevaluated context).
4243
g: (s, sz) pre(s.sz() != 0) = { }
4344
}
4445

Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
123
2+
0
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
hi ho hum
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
12145505332166550543

Diff for: regression-tests/test-results/apple-clang-14-c++2b/pure2-last-use.cpp.output

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ pure2-last-use.cpp2:344:16: error: no template named 'move_only_function' in nam
1313
pure2-last-use.cpp2:348:161: error: no member named 'move_only_function' in namespace 'std'
1414
CPP2_REQUIRES_ (std::is_convertible_v<CPP2_TYPEOF(a_), std::add_const_t<std::unique_ptr<int>>&> && std::is_convertible_v<CPP2_TYPEOF(b_), std::add_const_t<std::move_only_function<int()>>&> && std::is_convertible_v<CPP2_TYPEOF(c_), std::add_const_t<std::add_lvalue_reference_t<int>>&>) ;
1515
~~~~~^
16-
../../../include/cpp2util.h:10008:43: note: expanded from macro 'CPP2_REQUIRES_'
16+
../../../include/cpp2util.h:10109:43: note: expanded from macro 'CPP2_REQUIRES_'
1717
#define CPP2_REQUIRES_(...) requires (__VA_ARGS__)
1818
^~~~~~~~~~~
1919
pure2-last-use.cpp2:348:188: error: expected expression
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
../../../include/cpp2util.h(1108) 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(1156) 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]
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
../../../include/cpp2util.h(920) : Bounds safety violation
1+
../../../include/cpp2util.h(965) : Bounds safety violation
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
../../../include/cpp2util.h(920) : Contract violation: fill: value must contain at least count elements
1+
../../../include/cpp2util.h(965) : 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(999) decltype(auto) cpp2::impl::assert_not_null(auto &&, std::source_location) [arg:auto = int *&]
2+
from source location: ../../../include/cpp2util.h(1047) decltype(auto) cpp2::impl::assert_not_null(auto &&, std::source_location) [arg:auto = int *&]
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
123
2+
0
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
../../../include/cpp2util.h(999) 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(1047) 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
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
../../../include/cpp2util.h(999) 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(1047) 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
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
../../../include/cpp2util.h(999) 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(1047) 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
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
../../../include/cpp2util.h(999) 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(1047) 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
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
hi ho hum
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
12145505332166550543

Diff for: regression-tests/test-results/apple-clang-15-c++2b/pure2-last-use.cpp.output

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ pure2-last-use.cpp2:344:16: error: no template named 'move_only_function' in nam
1313
pure2-last-use.cpp2:348:161: error: no member named 'move_only_function' in namespace 'std'
1414
CPP2_REQUIRES_ (std::is_convertible_v<CPP2_TYPEOF(a_), std::add_const_t<std::unique_ptr<int>>&> && std::is_convertible_v<CPP2_TYPEOF(b_), std::add_const_t<std::move_only_function<int()>>&> && std::is_convertible_v<CPP2_TYPEOF(c_), std::add_const_t<std::add_lvalue_reference_t<int>>&>) ;
1515
~~~~~^
16-
../../../include/cpp2util.h:10008:43: note: expanded from macro 'CPP2_REQUIRES_'
16+
../../../include/cpp2util.h:10109:43: note: expanded from macro 'CPP2_REQUIRES_'
1717
#define CPP2_REQUIRES_(...) requires (__VA_ARGS__)
1818
^~~~~~~~~~~
1919
pure2-last-use.cpp2:348:188: error: expected expression

Diff for: regression-tests/test-results/clang-12-c++20/mixed-bugfix-for-ufcs-non-local.cpp.output

+1-26
Original file line numberDiff line numberDiff line change
@@ -106,29 +106,4 @@ mixed-bugfix-for-ufcs-non-local.cpp2:27:29: error: a lambda expression cannot ap
106106
../../../include/cpp2util.h:10058:66: note: expanded from macro 'CPP2_UFCS_'
107107
#define CPP2_UFCS_(LAMBDADEFCAPT,SFINAE,MVFWD,QUALID,TEMPKW,...) \
108108
^
109-
mixed-bugfix-for-ufcs-non-local.cpp2:42:77: error: no matching function for call to object of type 'ns::u::(lambda at mixed-bugfix-for-ufcs-non-local.cpp2:42:77)'
110-
requires (std::is_convertible_v<CPP2_TYPEOF(x), std::add_const_t<decltype(CPP2_UFCS_NONLOCAL(f)(o))>&>) { return CPP2_FORWARD(x); }(true) };
111-
^~~~~~~~~~~~~~~~~~~~~
112-
../../../include/cpp2util.h:10096:59: note: expanded from macro 'CPP2_UFCS_NONLOCAL'
113-
#define CPP2_UFCS_NONLOCAL(...) CPP2_UFCS_(,CPP2_UFCS_IDENTITY,CPP2_UFCS_IDENTITY,(),,__VA_ARGS__)
114-
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
115-
../../../include/cpp2util.h:10058:66: note: expanded from macro 'CPP2_UFCS_'
116-
#define CPP2_UFCS_(LAMBDADEFCAPT,SFINAE,MVFWD,QUALID,TEMPKW,...) \
117-
^
118-
mixed-bugfix-for-ufcs-non-local.cpp2:42:77: note: candidate template ignored: couldn't infer template argument 'Obj'
119-
../../../include/cpp2util.h:10096:59: note: expanded from macro 'CPP2_UFCS_NONLOCAL'
120-
#define CPP2_UFCS_NONLOCAL(...) CPP2_UFCS_(,CPP2_UFCS_IDENTITY,CPP2_UFCS_IDENTITY,(),,__VA_ARGS__)
121-
^
122-
../../../include/cpp2util.h:10058:66: note: expanded from macro 'CPP2_UFCS_'
123-
#define CPP2_UFCS_(LAMBDADEFCAPT,SFINAE,MVFWD,QUALID,TEMPKW,...) \
124-
^
125-
mixed-bugfix-for-ufcs-non-local.cpp2:42:77: error: lambda expression in an unevaluated operand
126-
requires (std::is_convertible_v<CPP2_TYPEOF(x), std::add_const_t<decltype(CPP2_UFCS_NONLOCAL(f)(o))>&>) { return CPP2_FORWARD(x); }(true) };
127-
^
128-
../../../include/cpp2util.h:10096:59: note: expanded from macro 'CPP2_UFCS_NONLOCAL'
129-
#define CPP2_UFCS_NONLOCAL(...) CPP2_UFCS_(,CPP2_UFCS_IDENTITY,CPP2_UFCS_IDENTITY,(),,__VA_ARGS__)
130-
^
131-
../../../include/cpp2util.h:10058:66: note: expanded from macro 'CPP2_UFCS_'
132-
#define CPP2_UFCS_(LAMBDADEFCAPT,SFINAE,MVFWD,QUALID,TEMPKW,...) \
133-
^
134-
14 errors generated.
109+
12 errors generated.

Diff for: regression-tests/test-results/clang-15-c++20-libcpp/mixed-function-expression-with-pointer-capture.cpp.output

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
mixed-function-expression-with-pointer-capture.cpp2:13:18: error: no member named 'for_each' in namespace 'std::ranges'
2-
std::ranges::for_each(vec, [_0 = (&y)](auto const& x) mutable -> void {
2+
std::ranges::for_each(vec, [_0 = (&y)](auto const& x) mutable -> decltype(auto) {
33
~~~~~~~~~~~~~^
44
mixed-function-expression-with-pointer-capture.cpp2:18:18: error: no member named 'for_each' in namespace 'std::ranges'
55
std::ranges::for_each(vec, cpp2::move(callback));
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
123
2+
0
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
hi ho hum
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
12145505332166550543

Diff for: regression-tests/test-results/clang-15-c++20-libcpp/pure2-last-use.cpp.output

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ pure2-last-use.cpp2:344:16: error: no template named 'move_only_function' in nam
1313
pure2-last-use.cpp2:348:161: error: no member named 'move_only_function' in namespace 'std'
1414
CPP2_REQUIRES_ (std::is_convertible_v<CPP2_TYPEOF(a_), std::add_const_t<std::unique_ptr<int>>&> && std::is_convertible_v<CPP2_TYPEOF(b_), std::add_const_t<std::move_only_function<int()>>&> && std::is_convertible_v<CPP2_TYPEOF(c_), std::add_const_t<std::add_lvalue_reference_t<int>>&>) ;
1515
~~~~~^
16-
../../../include/cpp2util.h:10008:43: note: expanded from macro 'CPP2_REQUIRES_'
16+
../../../include/cpp2util.h:10109:43: note: expanded from macro 'CPP2_REQUIRES_'
1717
#define CPP2_REQUIRES_(...) requires (__VA_ARGS__)
1818
^~~~~~~~~~~
1919
pure2-last-use.cpp2:348:188: error: expected expression
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
../../../include/cpp2util.h(1108) 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(1156) 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]
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
../../../include/cpp2util.h(920) : Bounds safety violation
1+
../../../include/cpp2util.h(965) : Bounds safety violation
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
../../../include/cpp2util.h(920) : Contract violation: fill: value must contain at least count elements
1+
../../../include/cpp2util.h(965) : 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(999) decltype(auto) cpp2::impl::assert_not_null(auto &&, std::source_location) [arg:auto = int *&]
2+
from source location: ../../../include/cpp2util.h(1047) decltype(auto) cpp2::impl::assert_not_null(auto &&, std::source_location) [arg:auto = int *&]
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
123
2+
0
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
../../../include/cpp2util.h(999) 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(1047) 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
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
../../../include/cpp2util.h(999) 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(1047) 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
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
../../../include/cpp2util.h(999) 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(1047) 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
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
hi ho hum
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
6443762454025613088

Diff for: regression-tests/test-results/clang-15-c++20/pure2-last-use.cpp.output

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ pure2-last-use.cpp2:344:16: error: no template named 'move_only_function' in nam
1313
pure2-last-use.cpp2:348:161: error: no member named 'move_only_function' in namespace 'std'
1414
CPP2_REQUIRES_ (std::is_convertible_v<CPP2_TYPEOF(a_), std::add_const_t<std::unique_ptr<int>>&> && std::is_convertible_v<CPP2_TYPEOF(b_), std::add_const_t<std::move_only_function<int()>>&> && std::is_convertible_v<CPP2_TYPEOF(c_), std::add_const_t<std::add_lvalue_reference_t<int>>&>) ;
1515
~~~~~^
16-
../../../include/cpp2util.h:10008:43: note: expanded from macro 'CPP2_REQUIRES_'
16+
../../../include/cpp2util.h:10109:43: note: expanded from macro 'CPP2_REQUIRES_'
1717
#define CPP2_REQUIRES_(...) requires (__VA_ARGS__)
1818
^~~~~~~~~~~
1919
pure2-last-use.cpp2:348:188: error: expected expression
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
123
2+
0
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
hi ho hum
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
6443762454025613088

Diff for: regression-tests/test-results/clang-18-c++20/pure2-last-use.cpp.output

+2-2
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ pure2-last-use.cpp2:344:16: error: no template named 'move_only_function' in nam
1313
pure2-last-use.cpp2:348:161: error: no member named 'move_only_function' in namespace 'std'
1414
348 | CPP2_REQUIRES_ (std::is_convertible_v<CPP2_TYPEOF(a_), std::add_const_t<std::unique_ptr<int>>&> && std::is_convertible_v<CPP2_TYPEOF(b_), std::add_const_t<std::move_only_function<int()>>&> && std::is_convertible_v<CPP2_TYPEOF(c_), std::add_const_t<std::add_lvalue_reference_t<int>>&>) ;
1515
| ~~~~~^
16-
../../../include/cpp2util.h:10008:43: note: expanded from macro 'CPP2_REQUIRES_'
17-
10008 | #define CPP2_REQUIRES_(...) requires (__VA_ARGS__)
16+
../../../include/cpp2util.h:10109:43: note: expanded from macro 'CPP2_REQUIRES_'
17+
10109 | #define CPP2_REQUIRES_(...) requires (__VA_ARGS__)
1818
| ^~~~~~~~~~~
1919
pure2-last-use.cpp2:348:188: error: expected expression
2020
348 | CPP2_REQUIRES_ (std::is_convertible_v<CPP2_TYPEOF(a_), std::add_const_t<std::unique_ptr<int>>&> && std::is_convertible_v<CPP2_TYPEOF(b_), std::add_const_t<std::move_only_function<int()>>&> && std::is_convertible_v<CPP2_TYPEOF(c_), std::add_const_t<std::add_lvalue_reference_t<int>>&>) ;
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
123
2+
0
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
hi ho hum
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
12145505332166550543

Diff for: regression-tests/test-results/clang-18-c++23-libcpp/pure2-last-use.cpp.output

+2-2
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ pure2-last-use.cpp2:344:16: error: no template named 'move_only_function' in nam
1313
pure2-last-use.cpp2:348:161: error: no member named 'move_only_function' in namespace 'std'
1414
348 | CPP2_REQUIRES_ (std::is_convertible_v<CPP2_TYPEOF(a_), std::add_const_t<std::unique_ptr<int>>&> && std::is_convertible_v<CPP2_TYPEOF(b_), std::add_const_t<std::move_only_function<int()>>&> && std::is_convertible_v<CPP2_TYPEOF(c_), std::add_const_t<std::add_lvalue_reference_t<int>>&>) ;
1515
| ~~~~~^
16-
../../../include/cpp2util.h:10008:43: note: expanded from macro 'CPP2_REQUIRES_'
17-
10008 | #define CPP2_REQUIRES_(...) requires (__VA_ARGS__)
16+
../../../include/cpp2util.h:10109:43: note: expanded from macro 'CPP2_REQUIRES_'
17+
10109 | #define CPP2_REQUIRES_(...) requires (__VA_ARGS__)
1818
| ^~~~~~~~~~~
1919
pure2-last-use.cpp2:348:188: error: expected expression
2020
348 | CPP2_REQUIRES_ (std::is_convertible_v<CPP2_TYPEOF(a_), std::add_const_t<std::unique_ptr<int>>&> && std::is_convertible_v<CPP2_TYPEOF(b_), std::add_const_t<std::move_only_function<int()>>&> && std::is_convertible_v<CPP2_TYPEOF(c_), std::add_const_t<std::add_lvalue_reference_t<int>>&>) ;
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
mixed-bounds-safety-with-assert.cpp2(11) void print_subrange(const auto:115&, cpp2::impl::in<int>, cpp2::impl::in<int>) [with auto:115 = std::vector<int>; cpp2::impl::in<int> = const int]: Bounds safety violation
1+
mixed-bounds-safety-with-assert.cpp2(11) void print_subrange(const auto:129&, cpp2::impl::in<int>, cpp2::impl::in<int>) [with auto:129 = std::vector<int>; cpp2::impl::in<int> = const int]: Bounds safety violation

0 commit comments

Comments
 (0)