Skip to content

Commit

Permalink
CI Update tests - make all tests pass (#1324)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
jarzec authored Oct 31, 2024
1 parent ebfb7bc commit 1032a5b
Show file tree
Hide file tree
Showing 55 changed files with 87 additions and 99 deletions.
3 changes: 2 additions & 1 deletion regression-tests/mixed-bugfix-for-ufcs-non-local.cpp2
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@ d: _ == t<o.f()>(); // Fails on Clang 12 (lambda in unevaluated context).

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

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
123
0
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
hi ho hum
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
12145505332166550543
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ pure2-last-use.cpp2:344:16: error: no template named 'move_only_function' in nam
pure2-last-use.cpp2:348:161: error: no member named 'move_only_function' in namespace 'std'
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>>&>) ;
~~~~~^
../../../include/cpp2util.h:10008:43: note: expanded from macro 'CPP2_REQUIRES_'
../../../include/cpp2util.h:10109:43: note: expanded from macro 'CPP2_REQUIRES_'
#define CPP2_REQUIRES_(...) requires (__VA_ARGS__)
^~~~~~~~~~~
pure2-last-use.cpp2:348:188: error: expected expression
Expand Down
Original file line number Diff line number Diff line change
@@ -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]
../../../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 number Diff line number Diff line change
@@ -1 +1 @@
../../../include/cpp2util.h(920) : Bounds safety violation
../../../include/cpp2util.h(965) : Bounds safety violation
Original file line number Diff line number Diff line change
@@ -1 +1 @@
../../../include/cpp2util.h(920) : Contract violation: fill: value must contain at least count elements
../../../include/cpp2util.h(965) : Contract violation: fill: value must contain at least count elements
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
sending error to my framework... [dynamic null dereference attempt detected]
from source location: ../../../include/cpp2util.h(999) decltype(auto) cpp2::impl::assert_not_null(auto &&, std::source_location) [arg:auto = int *&]
from source location: ../../../include/cpp2util.h(1047) decltype(auto) cpp2::impl::assert_not_null(auto &&, std::source_location) [arg:auto = int *&]
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
123
0
Original file line number Diff line number Diff line change
@@ -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
../../../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 number Diff line number Diff line change
@@ -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
../../../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 number Diff line number Diff line change
@@ -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
../../../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 number Diff line number Diff line change
@@ -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
../../../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 number Diff line number Diff line change
@@ -0,0 +1 @@
hi ho hum
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
12145505332166550543
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ pure2-last-use.cpp2:344:16: error: no template named 'move_only_function' in nam
pure2-last-use.cpp2:348:161: error: no member named 'move_only_function' in namespace 'std'
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>>&>) ;
~~~~~^
../../../include/cpp2util.h:10008:43: note: expanded from macro 'CPP2_REQUIRES_'
../../../include/cpp2util.h:10109:43: note: expanded from macro 'CPP2_REQUIRES_'
#define CPP2_REQUIRES_(...) requires (__VA_ARGS__)
^~~~~~~~~~~
pure2-last-use.cpp2:348:188: error: expected expression
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,29 +106,4 @@ mixed-bugfix-for-ufcs-non-local.cpp2:27:29: error: a lambda expression cannot ap
../../../include/cpp2util.h:10058:66: note: expanded from macro 'CPP2_UFCS_'
#define CPP2_UFCS_(LAMBDADEFCAPT,SFINAE,MVFWD,QUALID,TEMPKW,...) \
^
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)'
requires (std::is_convertible_v<CPP2_TYPEOF(x), std::add_const_t<decltype(CPP2_UFCS_NONLOCAL(f)(o))>&>) { return CPP2_FORWARD(x); }(true) };
^~~~~~~~~~~~~~~~~~~~~
../../../include/cpp2util.h:10096:59: note: expanded from macro 'CPP2_UFCS_NONLOCAL'
#define CPP2_UFCS_NONLOCAL(...) CPP2_UFCS_(,CPP2_UFCS_IDENTITY,CPP2_UFCS_IDENTITY,(),,__VA_ARGS__)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../../include/cpp2util.h:10058:66: note: expanded from macro 'CPP2_UFCS_'
#define CPP2_UFCS_(LAMBDADEFCAPT,SFINAE,MVFWD,QUALID,TEMPKW,...) \
^
mixed-bugfix-for-ufcs-non-local.cpp2:42:77: note: candidate template ignored: couldn't infer template argument 'Obj'
../../../include/cpp2util.h:10096:59: note: expanded from macro 'CPP2_UFCS_NONLOCAL'
#define CPP2_UFCS_NONLOCAL(...) CPP2_UFCS_(,CPP2_UFCS_IDENTITY,CPP2_UFCS_IDENTITY,(),,__VA_ARGS__)
^
../../../include/cpp2util.h:10058:66: note: expanded from macro 'CPP2_UFCS_'
#define CPP2_UFCS_(LAMBDADEFCAPT,SFINAE,MVFWD,QUALID,TEMPKW,...) \
^
mixed-bugfix-for-ufcs-non-local.cpp2:42:77: error: lambda expression in an unevaluated operand
requires (std::is_convertible_v<CPP2_TYPEOF(x), std::add_const_t<decltype(CPP2_UFCS_NONLOCAL(f)(o))>&>) { return CPP2_FORWARD(x); }(true) };
^
../../../include/cpp2util.h:10096:59: note: expanded from macro 'CPP2_UFCS_NONLOCAL'
#define CPP2_UFCS_NONLOCAL(...) CPP2_UFCS_(,CPP2_UFCS_IDENTITY,CPP2_UFCS_IDENTITY,(),,__VA_ARGS__)
^
../../../include/cpp2util.h:10058:66: note: expanded from macro 'CPP2_UFCS_'
#define CPP2_UFCS_(LAMBDADEFCAPT,SFINAE,MVFWD,QUALID,TEMPKW,...) \
^
14 errors generated.
12 errors generated.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
mixed-function-expression-with-pointer-capture.cpp2:13:18: error: no member named 'for_each' in namespace 'std::ranges'
std::ranges::for_each(vec, [_0 = (&y)](auto const& x) mutable -> void {
std::ranges::for_each(vec, [_0 = (&y)](auto const& x) mutable -> decltype(auto) {
~~~~~~~~~~~~~^
mixed-function-expression-with-pointer-capture.cpp2:18:18: error: no member named 'for_each' in namespace 'std::ranges'
std::ranges::for_each(vec, cpp2::move(callback));
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
123
0
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
hi ho hum
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
12145505332166550543
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ pure2-last-use.cpp2:344:16: error: no template named 'move_only_function' in nam
pure2-last-use.cpp2:348:161: error: no member named 'move_only_function' in namespace 'std'
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>>&>) ;
~~~~~^
../../../include/cpp2util.h:10008:43: note: expanded from macro 'CPP2_REQUIRES_'
../../../include/cpp2util.h:10109:43: note: expanded from macro 'CPP2_REQUIRES_'
#define CPP2_REQUIRES_(...) requires (__VA_ARGS__)
^~~~~~~~~~~
pure2-last-use.cpp2:348:188: error: expected expression
Expand Down
Original file line number Diff line number Diff line change
@@ -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]
../../../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 number Diff line number Diff line change
@@ -1 +1 @@
../../../include/cpp2util.h(920) : Bounds safety violation
../../../include/cpp2util.h(965) : Bounds safety violation
Original file line number Diff line number Diff line change
@@ -1 +1 @@
../../../include/cpp2util.h(920) : Contract violation: fill: value must contain at least count elements
../../../include/cpp2util.h(965) : Contract violation: fill: value must contain at least count elements
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
sending error to my framework... [dynamic null dereference attempt detected]
from source location: ../../../include/cpp2util.h(999) decltype(auto) cpp2::impl::assert_not_null(auto &&, std::source_location) [arg:auto = int *&]
from source location: ../../../include/cpp2util.h(1047) decltype(auto) cpp2::impl::assert_not_null(auto &&, std::source_location) [arg:auto = int *&]
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
123
0
Original file line number Diff line number Diff line change
@@ -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
../../../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 number Diff line number Diff line change
@@ -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
../../../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 number Diff line number Diff line change
@@ -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
../../../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 number Diff line number Diff line change
@@ -0,0 +1 @@
hi ho hum
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
6443762454025613088
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ pure2-last-use.cpp2:344:16: error: no template named 'move_only_function' in nam
pure2-last-use.cpp2:348:161: error: no member named 'move_only_function' in namespace 'std'
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>>&>) ;
~~~~~^
../../../include/cpp2util.h:10008:43: note: expanded from macro 'CPP2_REQUIRES_'
../../../include/cpp2util.h:10109:43: note: expanded from macro 'CPP2_REQUIRES_'
#define CPP2_REQUIRES_(...) requires (__VA_ARGS__)
^~~~~~~~~~~
pure2-last-use.cpp2:348:188: error: expected expression
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
123
0
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
hi ho hum
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
6443762454025613088
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ pure2-last-use.cpp2:344:16: error: no template named 'move_only_function' in nam
pure2-last-use.cpp2:348:161: error: no member named 'move_only_function' in namespace 'std'
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>>&>) ;
| ~~~~~^
../../../include/cpp2util.h:10008:43: note: expanded from macro 'CPP2_REQUIRES_'
10008 | #define CPP2_REQUIRES_(...) requires (__VA_ARGS__)
../../../include/cpp2util.h:10109:43: note: expanded from macro 'CPP2_REQUIRES_'
10109 | #define CPP2_REQUIRES_(...) requires (__VA_ARGS__)
| ^~~~~~~~~~~
pure2-last-use.cpp2:348:188: error: expected expression
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>>&>) ;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
123
0
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
hi ho hum
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
12145505332166550543
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ pure2-last-use.cpp2:344:16: error: no template named 'move_only_function' in nam
pure2-last-use.cpp2:348:161: error: no member named 'move_only_function' in namespace 'std'
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>>&>) ;
| ~~~~~^
../../../include/cpp2util.h:10008:43: note: expanded from macro 'CPP2_REQUIRES_'
10008 | #define CPP2_REQUIRES_(...) requires (__VA_ARGS__)
../../../include/cpp2util.h:10109:43: note: expanded from macro 'CPP2_REQUIRES_'
10109 | #define CPP2_REQUIRES_(...) requires (__VA_ARGS__)
| ^~~~~~~~~~~
pure2-last-use.cpp2:348:188: error: expected expression
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>>&>) ;
Expand Down
Original file line number Diff line number Diff line change
@@ -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
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
Loading

0 comments on commit 1032a5b

Please sign in to comment.