Rewording "static_assert" diagnosticsThis patch rewords the static assert diagnostic output. Failing a_Static_assert in C should not report that static_assert failed. Thischanges the wording to b
Rewording "static_assert" diagnosticsThis patch rewords the static assert diagnostic output. Failing a_Static_assert in C should not report that static_assert failed. Thischanges the wording to be more like GCC and uses "static assertion"when possible instead of hard coding the name. This also changes someinstances of 'static_assert' to instead be based on the token in thesource code.Differential Revision: https://reviews.llvm.org/D129048
show more ...
Revert "Rewording the "static_assert" to static assertion"Looks like we again are going to have problems with libcxx tests thatare overly specific in their dependency on clang's diagnostics.This
Revert "Rewording the "static_assert" to static assertion"Looks like we again are going to have problems with libcxx tests thatare overly specific in their dependency on clang's diagnostics.This reverts commit 6542cb55a3eb115b1c3592514590a19987ffc498.
Rewording the "static_assert" to static assertionThis patch is basically the rewording of the static assert statement'soutput(error) on screen after failing. Failing a _Static_assert in Cshould n
Rewording the "static_assert" to static assertionThis patch is basically the rewording of the static assert statement'soutput(error) on screen after failing. Failing a _Static_assert in Cshould not report that static_assert failed. It’d probably be better toreword the diagnostic to be more like GCC and say “static assertion”failed in both C and C++.consider a c file having code_Static_assert(0, "oh no!");In clang the output is like:<source>:1:1: error: static_assert failed: oh no!_Static_assert(0, "oh no!");^ ~1 error generated.Compiler returned: 1Thus here the "static_assert" is not much good, it will be better toreword it to the "static assertion failed" to more generic. as the gccprints as:<source>:1:1: error: static assertion failed: "oh no!" 1 | _Static_assert(0, "oh no!"); | ^~~~~~~~~~~~~~ Compiler returned: 1The above can also be seen here. This patch is about rewordingthe static_assert to static assertion.Differential Revision: https://reviews.llvm.org/D129048
[libc++] Add the __bind_back and __compose helpersThose are going to be used to implement range adaptors,see D107098 for details.Differential Revision: https://reviews.llvm.org/D107785
[libc++][NFC] Simplify tests for bind_front
[libc++] Refactor __perfect_forward, bind_front and not_fnThis patch fixes the constrains on the __perfect_forward constructorand its call operators, which were incorrect. In particular, it makes
[libc++] Refactor __perfect_forward, bind_front and not_fnThis patch fixes the constrains on the __perfect_forward constructorand its call operators, which were incorrect. In particular, it makessure that we closely follow [func.require], which basically says thatwe must deliver the bound arguments with the appropriate value categoryor make the call ill-formed, but not silently fall back to using adifferent value category.As a fly-by, this patch also:- Adds types __bind_front_t and __not_fn_t to make the result of calling bind_front and not_fn more opaque, and improve diagnostics for users.- Adds a bunch of tests for bind_front and remove some that are now redundant.- Adds some missing _LIBCPP_HIDE_FROM_ABI annotations.Immense thanks to @tcanens for raising awareness about this issue, andproviding help with the = delete bits.Differential Revision: https://reviews.llvm.org/D107199
[libc++] NFC: Remove unused c++98 Lit feature
[libc++] Add bind_front function (P0356R5).Implementes [[ http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2018/p0356r5.html | P0356R5 ]]. Adds `bind_front` to `functional`.Reviewed By: ldionne
[libc++] Add bind_front function (P0356R5).Implementes [[ http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2018/p0356r5.html | P0356R5 ]]. Adds `bind_front` to `functional`.Reviewed By: ldionne, #libc, QuuxplusoneDifferential Revision: https://reviews.llvm.org/D60368