[PATCH] D40144: Implement `std::launder`

2017-11-22 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists closed this revision. mclow.lists added a comment. landed as revision 318864 https://reviews.llvm.org/D40144 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D40144: Implement `std::launder`

2017-11-21 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists updated this revision to Diff 123877. mclow.lists added a comment. `_VSTD::` qualify the call to `__launder`. De-dup error messages in test. https://reviews.llvm.org/D40144 Files: include/__config include/new

[PATCH] D40144: Implement `std::launder`

2017-11-21 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists added inline comments. Comment at: test/std/language.support/support.dynamic/ptr.launder/launder.nodiscard.fail.cpp:16 +// UNSUPPORTED: c++98, c++03, c++11, c++14, c++17 +// UNSUPPORTED: clang-3.3, clang-3.4, clang-3.5, clang-3.6, clang-3.7, clang-3.8 +

[PATCH] D40324: [libcxx] [test] Resolve C1XX warning in new vector::size tests caused by assert(true)

2017-11-21 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists added a comment. D'Oh - that was a paste that went wrong. You are correct that `assert(c.size() == 3)` is correct. However, what I was *trying* to fix were the lines before. Pushing a `3` into a `vector` is not the best idea L#34 and L#53 should both read `c.push_back(true);`

[PATCH] D40144: Implement `std::launder`

2017-11-20 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists updated this revision to Diff 123663. mclow.lists added a comment. Un-c++17'ed the internal function `__launder` https://reviews.llvm.org/D40144 Files: include/__config include/new test/std/language.support/support.dynamic/ptr.launder/launder.nodiscard.fail.cpp

[PATCH] D40144: Implement `std::launder`

2017-11-20 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists added inline comments. Comment at: include/new:260 +static_assert (!is_function<_Tp>::value, "can't launder functions" ); +static_assert (!is_same_v>, "can't launder cv-void" ); +#ifdef _LIBCPP_COMPILER_HAS_BUILTIN_LAUNDER

[PATCH] D40144: Implement `std::launder`

2017-11-20 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists updated this revision to Diff 123644. mclow.lists added a comment. Made an internal function `__launder` which is not c++17 specific. Fixed some wording for the standard asserts. https://reviews.llvm.org/D40144 Files: include/__config include/new

[PATCH] D40144: Implement `std::launder`

2017-11-17 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists updated this revision to Diff 123422. mclow.lists marked an inline comment as done. mclow.lists added a comment. Move the `launder` function into the main libc++ namespace. Call `__builtin_launder` when available. Check to see when it's available (for gcc and clang)

[PATCH] D40144: Implement `std::launder`

2017-11-17 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists marked an inline comment as done. mclow.lists added inline comments. Comment at: include/new:174 +_LIBCPP_NODISCARD_AFTER_CXX17 inline _LIBCPP_INLINE_VISIBILITY +constexpr _Tp* launder(_Tp* __p) noexcept { return __p;} +#endif efriedma wrote: >

[PATCH] D40144: Implement `std::launder`

2017-11-16 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists created this revision. `std::launder` was introduced into c++17 as a compiler optimization barrier. It's something that the compiler 'knows about', and affects codegen. See https://wg21.link/p0137r1 for more. https://reviews.llvm.org/D40144 Files: include/new

[PATCH] D38362: Mark tests as unsupported in C++98 as well

2017-11-02 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists accepted this revision. mclow.lists added a comment. This revision is now accepted and ready to land. LGTM https://reviews.llvm.org/D38362 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D39149: [libc++] Prevent tautological comparisons

2017-10-30 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists added a comment. If we have to go down this road, I'd prefer the approach used in http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/experimental/filesystem/fs.op.funcs/fs.op.last_write_time/last_write_time.pass.cpp?r1=315874=315873=315874 https://reviews.llvm.org/D39149

[PATCH] D39149: [libc++] Prevent tautological comparisons

2017-10-30 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists added a comment. I dislike this change fairly strongly. I would much rather pursue a clang-based solution (since clang is being unhelpful here) Don't know if we can get one, though. https://reviews.llvm.org/D39149 ___ cfe-commits

[PATCH] D39405: std::set_union accesses values after move.

2017-10-30 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists accepted this revision. mclow.lists added a comment. This revision is now accepted and ready to land. Committed as revision 316914. Thanks! https://reviews.llvm.org/D39405 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D39308: [libcxx] Keep track of heap allocated regex states

2017-10-25 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists added a comment. I can confirm that with this patch the (large) regex that used to cause a stack overflow does not any more. https://reviews.llvm.org/D39308 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D39308: [libcxx] Keep track of heap allocated regex states

2017-10-25 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists added a comment. A couple of notes. - This change means that now requires C++11 (the new `__push` function w/ the varargs). I don't know how important that is; but I'm pretty sure libc++ currently provides `` in C++03 mode. - This is an ABI change; existing code that was compiled

[PATCH] D39066: [libcxx, regex] Fix signed overflow when constructing integers from brace expressions.

2017-10-19 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists closed this revision. mclow.lists added a comment. Committed as revision 316172. https://reviews.llvm.org/D39066 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D39066: [libcxx, regex] Fix signed overflow when constructing integers from brace expressions.

2017-10-19 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists accepted this revision. mclow.lists added a comment. This revision is now accepted and ready to land. LGTM. https://reviews.llvm.org/D39066 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D37955: [libcxx] Fix invert negative bracket match.

2017-10-18 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists closed this revision. mclow.lists added a comment. Landed as revision 316095. https://reviews.llvm.org/D37955 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D38757: [libc++] Fix PR34898 - vector iterator constructors and assign method perform push_back instead of emplace_back.

2017-10-11 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists accepted this revision. mclow.lists added a comment. This revision is now accepted and ready to land. LGTM - thanks! https://reviews.llvm.org/D38757 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D37955: [libcxx] Fix invert negative bracket match.

2017-09-19 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists accepted this revision. mclow.lists added a comment. This revision is now accepted and ready to land. All the tests pass now (on Mac OS) Thanks! https://reviews.llvm.org/D37955 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D37955: [libcxx] Fix invert negative bracket match.

2017-09-19 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists requested changes to this revision. mclow.lists added a comment. This revision now requires changes to proceed. When I applied this patch locally, some of the other tests started failing. Specifically: Assertion failed: (!std::regex_match(s, m, std::regex("^[a-f]$",

[PATCH] D35472: Implement P0463R1: "Endian just Endian"

2017-09-18 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists updated this revision to Diff 115714. mclow.lists added a comment. Fixed test and #ifdef guard https://reviews.llvm.org/D35472 Files: include/type_traits test/std/utilities/meta/meta.type.synop/endian.pass.cpp Index: test/std/utilities/meta/meta.type.synop/endian.pass.cpp

[PATCH] D37994: Implement LWG2946: More ambiguity in `string` vs. `string_view`

2017-09-18 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists created this revision. See https://wg21.link/lwg2946 for details. This issue has not yet been adopted by WG21, but I implemented it to make sure that there were no problems in the proposed resolution. It turns out that there was. Making these changes lost the ability to construct

[PATCH] D37871: [ASAN] Add macro denoting availability of new `__asan_handle_no_return()` function.

2017-09-14 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists added a comment. This looks fine to me (along with https://reviews.llvm.org/D37872) https://reviews.llvm.org/D37871 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D28224: [libcxx, regex] Throw exception after too many steps.

2017-09-12 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists accepted this revision. mclow.lists added a comment. This revision is now accepted and ready to land. Applied as revision 313056 (with minor editing) https://reviews.llvm.org/D28224 ___ cfe-commits mailing list

[PATCH] D37104: [libc++] PR34298: Change std::function constructor and move assignment operator SFINAE checks to allow std::function with an incomplete return type

2017-08-31 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists added inline comments. Comment at: test/libcxx/utilities/function.objects/func.require/incomplete_return_type.pass.cpp:22 +int main() { + return 0; +} Is copy constructible; can be instantiated. static_assert(

[PATCH] D35470: [libcxx] Implement pointer_traits::to_address as in P0653R0

2017-08-31 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists added a comment. This feature has not been added to the draft standard yet, so I'm reluctant to add it to libc++. I appreciate the patch, and we may adopt it in the future, but not now. https://reviews.llvm.org/D35470 ___ cfe-commits

[PATCH] D35732: Update system_error tests for more platforms.

2017-08-31 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists added inline comments. Comment at: test/std/diagnostics/syserr/syserr.errcat/syserr.errcat.objects/generic_category.pass.cpp:35 +// Exact message format varies by platform. +LIBCPP_ASSERT(msg == "Unknown error -1" || msg == "Unknown error" || +

[PATCH] D36720: [libc++] Prevent stale site configuration headers

2017-08-31 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists added a comment. This looks reasonable to me. https://reviews.llvm.org/D36720 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D37024: [libcxx] [test] Cleanup nullopt_t tests

2017-08-31 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists accepted this revision. mclow.lists added a comment. This revision is now accepted and ready to land. LGTM. https://reviews.llvm.org/D37024 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D37318: [libcxx] [www] Cleanup links to be https.

2017-08-31 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists accepted this revision. mclow.lists added a comment. This revision is now accepted and ready to land. LGTM; thanks! https://reviews.llvm.org/D37318 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D37182: [libcxx] Special visibility macros for the experimental library

2017-08-30 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists added a comment. The reason for building the filesystem library as a statically linked lib (instead of dynamic) is that for quite a while it was changing significantly. Having people link statically means that we can make changes w/o worrying (as much) about people using the

[PATCH] D32788: Fix std::inplace_merge to be stable for all inputs

2017-08-28 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists added a comment. I committed as r311952 which fixes this - based on Jan's suggestion, but not quite the same as this patch. https://reviews.llvm.org/D32788 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D37104: [libc++] PR34298: Change std::function constructor and move assignment operator SFINAE checks to allow std::function with an incomplete return type

2017-08-28 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists added inline comments. Comment at: test/libcxx/utilities/function.objects/func.require/incomplete_return_type.pass.cpp:1 +//===--===// +// mclow.lists wrote: > Is this file in the

[PATCH] D37104: [libc++] PR34298: Change std::function constructor and move assignment operator SFINAE checks to allow std::function with an incomplete return type

2017-08-28 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists added inline comments. Comment at: test/libcxx/utilities/function.objects/func.require/incomplete_return_type.pass.cpp:1 +//===--===// +// Is this file in the right place? If it's

[PATCH] D32788: Fix std::inplace_merge to be stable for all inputs

2017-08-27 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists added a comment. Note: I suspect that the proposed change to `` fixes the problem, but the new tests don't check that. https://reviews.llvm.org/D32788 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D32788: Fix std::inplace_merge to be stable for all inputs

2017-08-27 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists added a comment. I applied the test change, but not the algorithm change, and the tests passed. https://reviews.llvm.org/D32788 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D36713: [libc++] Add a persistent way to disable availability

2017-08-14 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists added a comment. What's the use case here? What are you trying to accomplish? https://reviews.llvm.org/D36713 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D35472: Implement P0463R1: "Endian just Endian"

2017-07-17 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists added inline comments. Comment at: include/type_traits:4740 +#if _LIBCPP_STD_VER > 14 +enum class endian lebedev.ri wrote: > (Apologies for double commenting, did not notice that it was in phab until > after replying) > > I'm probably wrong, but

[PATCH] D35472: Implement P0463R1: "Endian just Endian"

2017-07-16 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists created this revision. Implement the C++2a feature "A compile time endian-ness detection idiom" Howard's suggested implementation is: enum class endian { #ifdef _WIN32 little = 0, big= 1, native = little #else

[PATCH] D32411: [libcxx] Provide #include_next alternative for MSVC

2017-07-05 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists added a comment. @smeenai wrote: > This is kinda ugly, but I can't think of a better way to do it. I'm fine with > this, but given that it's a pretty invasive change, I'm not comfortable > accepting. You may wanna ping @EricWF and @mclow.lists directly. I'll be meeting with the MS

[PATCH] D34574: [Sema] Disable c++17 aligned new and delete operators if not implemented in the deployment target's c++ standard library

2017-07-05 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists added a comment. This commit breaks all the libc++ aligned new/delete tests on Mac OS. Was that deliberate? Failing Tests (8): libc++ :: std/language.support/support.dynamic/new.delete/new.delete.array/delete_align_val_t_replace.pass.cpp libc++ ::

[PATCH] D34556: [libcxx] Annotate c++17 aligned new/delete operators with availability attribute

2017-07-05 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists added a comment. > I'm not exactly sure why the test failed, but the patch was reverted in > r306859. My bad, since the tests are failing due to clang whining about the system dylib not supporting aligned new/delete on 10.12, I meant to post this on

[PATCH] D34556: [libcxx] Annotate c++17 aligned new/delete operators with availability attribute

2017-07-05 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists added a comment. This doesn't work when running the libc++ tests against a non-system libc++. (which is what all the libc++ developers and AND all the test bots do) Repository: rL LLVM https://reviews.llvm.org/D34556 ___ cfe-commits

[PATCH] D34249: [libc++] Don't use UTIME_OMIT to detect utimensat on Apple

2017-06-19 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists added inline comments. Comment at: src/experimental/filesystem/operations.cpp:27 +// We can use the presence of UTIME_OMIT to detect platforms that do not +// provide utimensat, with some exceptions on OS X. +#if !defined(UTIME_OMIT) ||

[PATCH] D34237: Mark the operations of __wrap_iter as constexpr

2017-06-15 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists created this revision. `__wrap_iter` is an internal libc++ class used to, well, wrap other iterators (such as pointers) when we need or want an object type. Mark the operations on `__wrap_iter` as constexpr, so that they can be used in a constexpr context if the underlying iterator

[PATCH] D33102: [clang] Implement -Wcast-qual for C++

2017-06-14 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists added a comment. As of r305410, libc++ passes all the tests w/ -Wcast-qual enabled. Repository: rL LLVM https://reviews.llvm.org/D33102 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D34211: Implement the non-execution policy versions of `inclusive_scan` and `transform_ inclusive_scan` for C++17

2017-06-14 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists created this revision. This is the last of three patches - https://reviews.llvm.org/D33997 and https://reviews.llvm.org/D34038 were the first two. When this lands, we'll have all of the new (non-parallel) algorithms that were added in C++17. https://reviews.llvm.org/D34211 Files:

[PATCH] D34038: Implement the non-parallel versions of exclusive_scan and transform_exclusive_scan

2017-06-13 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists accepted this revision. mclow.lists added a comment. This revision is now accepted and ready to land. This was committed as r305136 https://reviews.llvm.org/D34038 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D32146: PR32476: __nop_locale_mgmt.h not needed with newlib 2.5+

2017-06-13 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists added a comment. This change looks fine to me - but I don't have the different newlib versions to test against. Once everyone else is happy with the version detection, then I'm good with this. https://reviews.llvm.org/D32146 ___

[PATCH] D33997: Implement the non-execution policy versions of `reduce` and `transform_reduce` for C++17

2017-06-10 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists marked 7 inline comments as done. mclow.lists added inline comments. Comment at: include/numeric:154 +return reduce(__first, __last, + typename iterator_traits<_InputIterator>::value_type{}, _VSTD::plus<>()); +} wash wrote: > In the spec,

[PATCH] D33997: Implement the non-execution policy versions of `reduce` and `transform_reduce` for C++17

2017-06-10 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists updated this revision to Diff 102125. mclow.lists added a comment. Rebased now that https://reviews.llvm.org/D34038 has landed; address Richard and Bryce's comments https://reviews.llvm.org/D33997 Files: include/numeric

[PATCH] D34038: Implement the non-parallel versions of exclusive_scan and transform_exclusive_scan

2017-06-09 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists updated this revision to Diff 102100. mclow.lists added a comment. Previous update was br0ken. This is better. :-) Add a test to ensure that the calculations are done using the correct type. https://reviews.llvm.org/D34038 Files: include/numeric

[PATCH] D34038: Implement the non-parallel versions of exclusive_scan and transform_exclusive_scan

2017-06-09 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists updated this revision to Diff 102097. mclow.lists added a comment. Add extra tests to make sure that the calculations are not done using the source sequence value_type. https://reviews.llvm.org/D34038 Files: include/numeric

[PATCH] D34038: Implement the non-parallel versions of exclusive_scan and transform_exclusive_scan

2017-06-08 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists updated this revision to Diff 101989. mclow.lists added a comment. Turn the for loops into do-while loops, saving a comparison. https://reviews.llvm.org/D34038 Files: include/numeric test/std/numerics/numeric.ops/exclusive.scan/exclusive_scan_iter_iter_iter.pass.cpp

[PATCH] D34038: Implement the non-parallel versions of exclusive_scan and transform_exclusive_scan

2017-06-08 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists updated this revision to Diff 101988. mclow.lists added a comment. Added a `_VSTD::`, made some assertions `static_assert`, and addressed Bryce's concerns about doing an init when the input range is empty. https://reviews.llvm.org/D34038 Files: include/numeric

[PATCH] D33997: Implement the non-execution policy versions of `reduce` and `transform_reduce` for C++17

2017-06-08 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists added a comment. > Should the non-parallel implementation of reduce static_assert or SFINAE away > when these requirements are not met? That may be desirable, but that's not what the standard says. There's nothing there about "shall not participate in overload resolution".

[PATCH] D34038: Implement the non-parallel versions of exclusive_scan and transform_exclusive_scan

2017-06-08 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists created this revision. These are part of C++17. Later, we'll get the parallel versions. https://reviews.llvm.org/D34038 Files: include/numeric test/std/numerics/numeric.ops/exclusive.scan/exclusive_scan_iter_iter_iter.pass.cpp

[PATCH] D34007: Implement inclusive_scan and transform_inclusive_scan

2017-06-07 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists abandoned this revision. mclow.lists added a comment. I don't think that this is a correct implementation. Also, I need tests for when the result overwrites the source. As they say .. I'll be back :-) https://reviews.llvm.org/D34007

[PATCH] D34007: Implement inclusive_scan and transform_inclusive_scan

2017-06-07 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists added a comment. Re-reading this, I may have implemented `exclusive_scan` instead of `inclusive_scan` here. https://reviews.llvm.org/D34007 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D34007: Implement inclusive_scan and transform_inclusive_scan

2017-06-07 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists created this revision. Like https://reviews.llvm.org/D33997, this implements the non-parallel versions of these algorithms https://reviews.llvm.org/D33997 implemented `reduce` and `transform_reduce`, this adds `inclusive_scan` and `transform_inclusive_scan`. There will be another

[PATCH] D31956: Implement (part of) LWG2857: `{variant, optional, any}::emplace` should return the constructed value

2017-06-07 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists closed this revision. mclow.lists added a comment. Landed as r300123 https://reviews.llvm.org/D31956 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D33997: Implement the non-execution policy versions of `reduce` and `transform_reduce` for C++17

2017-06-07 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists added inline comments. Comment at: include/numeric:98 #include // for numeric_limits +#include I don't like adding this dependency; but the standard requires the use of `std::plus` and `std::multiplies` https://reviews.llvm.org/D33997

[PATCH] D33997: Implement the non-execution policy versions of `reduce` and `transform_reduce` for C++17

2017-06-07 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists created this revision. There are versions of `reduce` and `transform_reduce` that take an execution policy, and those that do not. This implements the ones that do not. https://reviews.llvm.org/D33997 Files: include/numeric

[PATCH] D33588: Fix two sources of UB in __next_hash_pow2 (from __hash_table)

2017-06-02 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists accepted this revision. mclow.lists added inline comments. This revision is now accepted and ready to land. Comment at: include/__hash_table:140 +return (__n > 1) ? (size_t(1) << (std::numeric_limits::digits - __clz(__n-1))) : __n; } I turned

[PATCH] D33588: Fix two sources of UB in __next_hash_pow2 (from __hash_table)

2017-05-26 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists added a comment. I can reproduce this, but I'd rather figure out why we're calling `__next_hash_pow2(0)` or `(1)` before deciding how to fix it. https://reviews.llvm.org/D33588 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D33550: Make __wrap_iter constexpr

2017-05-25 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists added inline comments. Comment at: include/iterator:1409 -private: +// private: #if _LIBCPP_DEBUG_LEVEL >= 2 This is testing debris - making the constructors public for testing. https://reviews.llvm.org/D33550

[PATCH] D33550: Make __wrap_iter constexpr

2017-05-25 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists created this revision. `__wrap_iter` is an internal libc++ class that is used as an iterator type when (for some reason) we don't want to use raw pointers as an iterator. It is the iterator type for `vector` and `string` (but not `array` - not sure why). If we used pointers, all

[PATCH] D33424: Lexer: allow imaginary constants in GNU mode (only).

2017-05-24 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists added a comment. More. Trying the above code on godbolt.org, gcc 6.1/6.2/6.3/7.1 all reject it (with `-std=c++14` and `-std=c++1z`) with the error message: > : In function 'int main()': > :4:30: error: unable to find numeric literal operator 'operator""if' > > { std::complex foo

[PATCH] D33424: Lexer: allow imaginary constants in GNU mode (only).

2017-05-24 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists added a comment. This broke a libc++ test. The following is expected to fail to compile: #include #include int main() { std::complex foo = 1.0if; // should fail w/conversion operator not found } when build as C++1z https://reviews.llvm.org/D33424

[PATCH] D33021: [libcxx] [test] libc++ test changes for CWG 2094

2017-05-10 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists added a comment. In general, I prefer having the space between `static_assert(` and the condition. That makes it easy (at least for me) to see if there's a `!` there or not. Other than that, this LGTM. FWIW, I think this is a language change that core got wrong, and it has already

[PATCH] D33033: [libc++] Fix PR32979 - types with a private std::enable_shared_from_this base break shared_ptr

2017-05-10 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists accepted this revision. mclow.lists added a comment. This revision is now accepted and ready to land. LGTM https://reviews.llvm.org/D33033 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D31561: cmath: Skip Libc for integral types in isinf, etc.

2017-04-18 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists added inline comments. Comment at: libcxx/include/math.h:400 +inline _LIBCPP_INLINE_VISIBILITY +typename std::enable_if::value, int>::type +fpclassify(_A1 __lcpp_x) _NOEXCEPT hfinkel wrote: > Maybe we should predicate this, and

[PATCH] D31769: Remove the binders `bind1st`, `bind2nd`, `men_fun`, etc from C++17

2017-04-13 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists closed this revision. mclow.lists added a comment. committed as revision 300232 https://reviews.llvm.org/D31769 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D31966: [libcxx] [test] Avoid Clang's -Wunused-const-variable in is_constructible.pass.cpp.

2017-04-12 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists accepted this revision. mclow.lists added a comment. This revision is now accepted and ready to land. LGTM https://reviews.llvm.org/D31966 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D31956: Implement (part of) LWG2857: `{variant, optional, any}::emplace` should return the constructed value

2017-04-11 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists created this revision. Implement the `optional` and `any` part of this issue. This changes the return type of these functions. https://reviews.llvm.org/D31956 Files: include/any include/optional test/std/utilities/any/any.class/any.modifiers/emplace.pass.cpp

[PATCH] D29877: Warn about unused static file scope function template declarations.

2017-04-11 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists added a comment. Complete reproducer: // Tested with with: clang++ -std=c++14 -Wunused-function UnusedFVassily.cpp // // UnusedFVassily.cpp:8:39: warning: unused function '__test' [-Wunused-function] // template static __two __test(...); //

[PATCH] D29877: Warn about unused static file scope function template declarations.

2017-04-11 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists added a comment. The following idiom for detecting member typedefs now throws an warning: struct __two {char __lx; char __lxx;}; namespace __has_pointer_type_imp { template __two __test(...); template char __test(typename _Up::pointer* = 0); } template

[PATCH] D31769: Remove the binders `bind1st`, `bind2nd`, `men_fun`, etc from C++17

2017-04-06 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists created this revision. As proposed in http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2014/n4190 I'm leaving `unary_function` and `binary_function` in place until I can figure out a non-ABI breaking way to remove them. To get them back in C++17, you can `-D

[PATCH] D16541: [libc++] Renable test/std/re/re.alg/re.alg.match/awk.pass.cpp

2017-04-06 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists accepted this revision. mclow.lists added a comment. This revision is now accepted and ready to land. committed as revision 299652 https://reviews.llvm.org/D16541 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D31515: [libc++] Implement LWG 2911 - add an is_aggregate type-trait

2017-04-06 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists accepted this revision. mclow.lists added a comment. This revision is now accepted and ready to land. LGTM https://reviews.llvm.org/D31515 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D30045: Remove `std::random_shuffle` in C++17

2017-03-24 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists closed this revision. mclow.lists added a comment. Committed as revision 298597 https://reviews.llvm.org/D30045 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D31163: Implement Pp0156r2 "Variadic Lock Guard, version 5"

2017-03-24 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists closed this revision. mclow.lists marked an inline comment as done. mclow.lists added a comment. Committed as revision 298681. https://reviews.llvm.org/D31163 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D31022: Implement P0298R3: `std::byte`

2017-03-23 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists closed this revision. mclow.lists added a comment. Committed as revision 298689 https://reviews.llvm.org/D31022 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D31163: Implement Pp0156r2 "Variadic Lock Guard, version 5"

2017-03-23 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists marked 8 inline comments as done. mclow.lists added inline comments. Comment at: include/mutex:176 +template unique_lock(unique_lock) +-> unique_lock; // C++17 mclow.lists wrote: > EricWF wrote: > > This should be guarded behind a feature test

[PATCH] D31163: Implement Pp0156r2 "Variadic Lock Guard, version 5"

2017-03-23 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists updated this revision to Diff 92896. mclow.lists added a comment. Removed the deduction guides. Guarded the tests for the deduction guides with #ifdefs. https://reviews.llvm.org/D31163 Files: include/__config include/__mutex_base include/mutex include/shared_mutex

[PATCH] D31234: Implement P0599 - noexcept for hash functions

2017-03-22 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists closed this revision. mclow.lists added a comment. Committed as revision 298573 https://reviews.llvm.org/D31234 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D31163: Implement Pp0156r2 "Variadic Lock Guard, version 5"

2017-03-22 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists added inline comments. Comment at: include/mutex:176 +template unique_lock(unique_lock) +-> unique_lock; // C++17 EricWF wrote: > This should be guarded behind a feature test macro. I would suggest adding > this to `__config`. > > ``` > #if

[PATCH] D31234: Implement P0599 - noexcept for hash functions

2017-03-22 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists updated this revision to Diff 92645. mclow.lists added a comment. Add missing include to the `thread::id` test and mark `unique_ptr`s hash as not noexcept. https://reviews.llvm.org/D31234 Files: include/memory include/optional include/thread include/variant

[PATCH] D31234: Implement P0599 - noexcept for hash functions

2017-03-21 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists created this revision. Mark most of the hash functions provided by libc++ as noexcept; the exceptions being `optional` and `variant`. Tests to ensure this. There's still some investigation to be done on `unique_ptr` and fancy pointer support, but that can come later.

[PATCH] D31163: Implement Pp0156r2 "Variadic Lock Guard, version 5"

2017-03-20 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists created this revision. WG21 has decided that the ABI-breaking `lock_guard` proposal that we (@EricWF) implemented (and hid behind an ABI-break macro) is not the way to go. Instead, we're introducing a new class, `scoped_lock`, which is variadic, and leaving `lock_guard` as

[PATCH] D31022: Implement P0298R3: `std::byte`

2017-03-20 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists updated this revision to Diff 92370. mclow.lists added a comment. Put the `std::byte` type in the unadorned namespace `std`, rather than the versioned one. This matches the behavior of other types that the compiler "knows about", like `initializer_list`, `type_info`, `bad_alloc`

[PATCH] D31022: Implement P0298R3: `std::byte`

2017-03-15 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists added inline comments. Comment at: www/cxx1z_status.html:144 http://wg21.link/P0521R0;>P0521R0LWGProposed Resolution for CA 14 (shared_ptr use_count/unique)IssaquahNothing to don/a + http://wg21.link/P0156R2;>P0156R2LWGVariadic Lock

[PATCH] D31022: Implement P0298R3: `std::byte`

2017-03-15 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists created this revision. Implement `std::byte` from the paper http://wg21.link/P0298R3. Split the implementation across two files; putting the stuff that needs `enable_if` into and the rest in , where it belongs. Sadly, this means that now includes (at the end).

[PATCH] D30035: Add const to function parameters

2017-02-21 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists added a comment. Absent I good motivation (i.e, a documented, significant performance change), I don't think we want this - not because it's not a reasonable change (it is!), but because it's an ABI break. It's unfortunate the `__atoms` were not passed as const in the first place.

[PATCH] D30045: Remove `std::random_shuffle` in C++17

2017-02-16 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists created this revision. http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2014/n4190 removed `random_shuffle` from C++1z. (and other stuff) Wrap all the random_shuffle bits in an #ifdef so they disappear when compiling with `-std=c++1z` or later. Introduce a new configuration

[PATCH] D28172: [libcxx] Remove unexpected handlers in C++17

2017-02-16 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists accepted this revision. mclow.lists added a comment. This revision is now accepted and ready to land. LGTM. Sorry for the slow response. https://reviews.llvm.org/D28172 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D28473: Implement http://wg21.link/P0426 Constexpr for std::char_traits

2017-02-13 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists closed this revision. mclow.lists added a comment. Landed as r291741, r291742 and r293154. https://reviews.llvm.org/D28473 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D20660: Remove `auto_ptr` in C++17.

2017-02-13 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists accepted this revision. mclow.lists added a comment. This revision is now accepted and ready to land. Landed as r292986 https://reviews.llvm.org/D20660 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

<    1   2   3   4   5   >