[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 http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-co

[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 http://lists.llvm.org/cgi-bin

[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 su

[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 ri

[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 http://lists.llvm.org/cg

[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 librar

[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 http://lists.llvm.org/cgi-bin/mai

[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 http://lists.llvm.org/cgi-bin/mailman/lis

[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] 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] 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 m

[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( std::is_copy_constructible::value

[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 cfe-commits@lists.llvm.org

[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] 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 a

[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] 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]$", std::regex_cons

[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 http

[PATCH] D62654: [Docs] Modernize references to macOS

2019-05-30 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists added a comment. I'm fine with the libc++ changes. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D62654/new/ https://reviews.llvm.org/D62654 ___ cfe-commits mailing list cfe-commits@lists.ll

[PATCH] D43159: Modernize: Use nullptr more.

2019-06-01 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists added a comment. In D43159#1526170 , @brucem wrote: > Can we revive this review? I'd still like to land this ... What was the result of testing with `-std=c++98` and/or `-std=gnu++98` ? The code changes look fine; but as @Ericwf said Re

[PATCH] D62782: Fix -Wdouble-promotion warnings.

2019-06-03 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists added a comment. This looks fine to me; but where were you getting these warnings? Repository: rCXX libc++ CHANGES SINCE LAST ACTION https://reviews.llvm.org/D62782/new/ https://reviews.llvm.org/D62782 ___ cfe-commits mailing list

[PATCH] D43226: __threading_support: Remove (void) in favor of ().

2019-06-03 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 looks fine to me. Repository: rCXX libc++ CHANGES SINCE LAST ACTION https://reviews.llvm.org/D43226/new/ https://reviews.llvm.org/D43226 ___

[PATCH] D44865: [libc++] Implement P0608R3 - A sane variant converting constructor

2019-06-09 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists added a comment. In D44865#1391996 , @lichray wrote: > Ping @mclow.lists @EricWF ; the patch still applies, is there any other > thing I need to address? Just a note: P0608R3 was adopted in San Diego. Repository: rCXX libc++ CHANGES SI

[PATCH] D44865: [libc++] Implement P0608R3 - A sane variant converting constructor

2019-06-10 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists added a comment. In D44865#1051228 , @EricWF wrote: > This LGTM. > > Also I would like @mclow.lists input about applying this DR early since LWG > hasn't commented on it yet. Even though LWG didn't vote it out as a DR; that's what it is, and

[PATCH] D44865: [libc++] Implement P0608R3 - A sane variant converting constructor

2019-06-10 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists added a comment. The patch looks fine to me, but I think you should consider making a couple of `T.fail.cpp` tests, and check to make sure you get the "right error". Comment at: test/std/utilities/variant/variant.variant/variant.assign/T.pass.cpp:130 { usi

[PATCH] D44865: [libc++] Implement P0608R3 - A sane variant converting constructor

2019-06-18 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 looks good to me. Thanks! Repository: rCXX libc++ CHANGES SINCE LAST ACTION https://reviews.llvm.org/D44865/new/ https://reviews.llvm.org/D44865 ___

[PATCH] D51262: Implement P0553 and P0556

2019-06-24 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists updated this revision to Diff 206339. mclow.lists added a comment. Update this patch to implement P1355R2 which makes out-of-bound inputs for `ceil2`UB. This was easy for integer types that are at least as big as `int`, but harder for smaller ones. CHANG

[PATCH] D51262: Implement P0553 and P0556

2019-06-24 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists marked 4 inline comments as done. mclow.lists added inline comments. Comment at: include/bit:254 + +if constexpr (sizeof(_Tp) <= sizeof(unsigned int)) + return __clz(static_cast(__t)) EricWF wrote: > Cool use of `if constexpr`. > > Ple

[PATCH] D51262: Implement P0553 and P0556

2019-06-24 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists added a comment. > Also are the unsigned types that aren't integral? I believe that people are allowed to specialize `is_unsigned` for their own (bignum, say) types. However, `is_integral` is not extensible. It refers to the types in `[basic.fundamental]` > Type `bool` is a distinc

[PATCH] D51262: Implement P0553 and P0556

2019-06-24 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists marked an inline comment as done. mclow.lists added inline comments. Comment at: libcxx/include/bit:378 + const unsigned __retVal = 1u << (__n + __extra); + return (_Tp) (__retVal >> __extra); +} Quuxplusone wrote: > Why so complicated

[PATCH] D51262: Implement P0553 and P0556

2019-06-24 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists marked 2 inline comments as done. mclow.lists added inline comments. Comment at: libcxx/include/bit:199 +!is_same_v, char32_t> + > {}; + Quuxplusone wrote: > Given how heavily the code controlled by this trait depends on > `numeric_limits

[PATCH] D51262: Implement P0553 and P0556

2019-06-24 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists marked an inline comment as done. mclow.lists added inline comments. Comment at: libcxx/include/bit:378 + const unsigned __retVal = 1u << (__n + __extra); + return (_Tp) (__retVal >> __extra); +} mclow.lists wrote: > Quuxplusone wrote:

[PATCH] D51262: Implement P0553 and P0556

2019-06-24 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists marked 4 inline comments as done. mclow.lists added inline comments. Comment at: libcxx/include/bit:252 +while (true) { +__t = rotr<_Tp>(__t, __ulldigits); +if ((__iter = countl_zero(static_cast(__t))) != __ulldigits)

[PATCH] D51262: Implement P0553 and P0556

2019-06-24 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists marked an inline comment as done. mclow.lists added inline comments. Comment at: libcxx/include/bit:378 + const unsigned __retVal = 1u << (__n + __extra); + return (_Tp) (__retVal >> __extra); +} mclow.lists wrote: > Quuxplusone wrote:

[PATCH] D51262: Implement P0553 and P0556

2019-06-24 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists marked an inline comment as done. mclow.lists added inline comments. Comment at: libcxx/include/bit:378 + const unsigned __retVal = 1u << (__n + __extra); + return (_Tp) (__retVal >> __extra); +} mclow.lists wrote: > mclow.lists wrote:

[PATCH] D51262: Implement P0553 and P0556

2019-06-25 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists added a comment. In D51262#1557154 , @jwakely wrote: > In D51262#1213514 , @mclow.lists > wrote: > > > I should also mention that as a conforming extension, I have implemented > > the non-numeric bit o

[PATCH] D51262: Implement P0553 and P0556

2019-06-25 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists updated this revision to Diff 206571. mclow.lists marked 4 inline comments as done. mclow.lists added a comment. Address a couple of review comments. Added a few more `uint128_t` rotation tests CHANGES SINCE LAST ACTION https://reviews.llvm.org/D51262/new/ https://reviews.llvm.org

[PATCH] D62782: Fix -Wdouble-promotion warnings.

2019-07-01 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. Sorry for the slow response. Repository: rCXX libc++ CHANGES SINCE LAST ACTION https://reviews.llvm.org/D62782/new/ https://reviews.llvm.org/D62782 _

[PATCH] D51262: Implement P0553 and P0556

2019-07-01 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists marked 7 inline comments as done. mclow.lists added inline comments. Comment at: libcxx/include/bit:236 + +if constexpr (sizeof(_Tp) <= sizeof(unsigned int)) +return __clz(static_cast(__t)) EricWF wrote: > Weird indentation. Clang-for

[PATCH] D51262: Implement P0553 and P0556

2019-07-01 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists updated this revision to Diff 207394. mclow.lists marked an inline comment as done. mclow.lists added a comment. Updated patch based on Eric's comments. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D51262/new/ https://reviews.llvm.org/D51262 Files: libcxx/include/bit li

[PATCH] D51262: Implement P0553 and P0556

2019-07-01 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists marked 5 inline comments as done. mclow.lists added a comment. I missed a couple of Eric's comments. Comment at: libcxx/include/bit:211 +? __t +: (__t << (__cnt % __dig)) | (__t >> (__dig - (__cnt % __dig))); +} xbolva00 wrote: > mcl

[PATCH] D51262: Implement P0553 and P0556

2019-07-01 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists updated this revision to Diff 207395. mclow.lists marked an inline comment as done. mclow.lists added a comment. Removed explicit `inline`s, changed ternary into `if` CHANGES SINCE LAST ACTION https://reviews.llvm.org/D51262/new/ https://reviews.llvm.org/D51262 Files: libcxx/in

[PATCH] D51262: Implement P0553 and P0556

2019-07-01 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists marked 2 inline comments as done. mclow.lists added inline comments. Comment at: libcxx/include/bit:208 +const unsigned int __dig = numeric_limits<_Tp>::digits; +return (__cnt % __dig) == 0 +? __t EricWF wrote: > Why did you choose to

[PATCH] D51262: Implement P0553 and P0556

2019-07-01 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists marked 2 inline comments as done. mclow.lists added inline comments. Comment at: libcxx/include/bit:203 +template +inline _LIBCPP_INLINE_VISIBILITY constexpr +enable_if_t<__bitop_unsigned_integer<_Tp>::value, _Tp> EricWF wrote: > Why the explicit inli

[PATCH] D51262: Implement P0553 and P0556

2019-07-01 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists closed this revision. mclow.lists added a comment. Committed as revision 364862 CHANGES SINCE LAST ACTION https://reviews.llvm.org/D51262/new/ https://reviews.llvm.org/D51262 ___ cfe-commits mailing list cfe-commits@lists.llvm.org htt

[PATCH] D43159: Modernize: Use nullptr more.

2019-07-03 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. Did you try to build libc++ or run the tests before submitting this? Comment at: include/__threading_support:323 bool __libcpp_thread_isnull(const __libc

[PATCH] D43159: Modernize: Use nullptr more.

2019-07-03 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists added a comment. In ``, you missed a couple of `(value_type*)0`. Line 3356, 3369, 3486 and 3499. Repository: rCXX libc++ CHANGES SINCE LAST ACTION https://reviews.llvm.org/D43159/new/ https://reviews.llvm.org/D43159 ___ cfe-commit

[PATCH] D43159: Modernize: Use nullptr more.

2019-07-03 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists added inline comments. Comment at: include/algorithm:4431 value_type* __p = __buff; -for (_BidirectionalIterator __i = __first; __i != __middle; __d.__incr((value_type*)0), (void) ++__i, ++__p) +for (_BidirectionalIterator __i = __first; __i

[PATCH] D43159: Modernize: Use nullptr more.

2019-07-03 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists added inline comments. Comment at: include/__threading_support:323 bool __libcpp_thread_isnull(const __libcpp_thread_t *__t) { - return *__t == 0; + return *__t == nullptr; } mclow.lists wrote: > This one is wrong. `__libcpp_thread_t` is an alias

[PATCH] D61366: [libcxx] [test] Don't assert that moved-from containers with non-POCMA allocators are empty.

2019-07-03 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists added a comment. Is there a reason this hasn't been committed? CHANGES SINCE LAST ACTION https://reviews.llvm.org/D61366/new/ https://reviews.llvm.org/D61366 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.o

[PATCH] D24372: [libcxx] Sprinkle constexpr over compressed_pair

2019-07-03 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists added a comment. Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Is this patch relevant any more? Repository: rL LLVM CHANGES SINCE LAST ACTION https://reviews.llvm.org/D24372/new/ https://reviews.llvm.org/D24372 ___

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

2019-07-03 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists added a comment. This is an old patch; is this still needed/desired? CHANGES SINCE LAST ACTION https://reviews.llvm.org/D37182/new/ https://reviews.llvm.org/D37182 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.

[PATCH] D40259: [libcxx] LWG2993: reference_wrapper

2019-07-03 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists added a comment. Did this ever get landed? If not, was there a reason? Note that the synopsis at the top of `` also needs to be updated. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D40259/new/ https://reviews.llvm.org/D40259 __

[PATCH] D61858: Make `__is_base_of` more friendly with unions

2019-05-13 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists created this revision. mclow.lists added reviewers: rsmith, t.p.northover, EricWF, ldionne. mclow.lists added a project: clang. Herald added a subscriber: dexonsmith. Unions are never base classes, and never have base classes. It doesn't matter if they are complete or not. See http://l

[PATCH] D61858: Make `__is_base_of` more friendly with unions

2019-05-13 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists added a comment. Note: There are tabs in `clang/test/SemaCXX/type-traits.cpp` that I didn't remove because it would have cluttered up the diff. I can de-tabify the file when it is committed if people want. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D61858/new/ https://rev

[PATCH] D61858: Make `__is_base_of` more friendly with unions

2019-05-13 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists added a comment. In D61858#1500270 , @ldionne wrote: > Shouldn't we also add unit tests for PR41843 in libc++? Yes. But I want to do that later. After this has landed (and probably wait a week for all the bots that are running trunk to updat

[PATCH] D61858: Make `__is_base_of` more friendly with unions

2019-05-13 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists closed this revision. mclow.lists added a comment. Committed as revision 360614 CHANGES SINCE LAST ACTION https://reviews.llvm.org/D61858/new/ https://reviews.llvm.org/D61858 ___ cfe-commits mailing list cfe-commits@lists.llvm.org htt

[PATCH] D62034: compiler-rt/lib/builtins: s/#include /#include /g to match proper case.

2019-05-17 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists added a comment. I have no objection to this; but I'm not really confident that this won't break more than it solves. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D62034/new/ https://reviews.llvm.org/D62034 _

[PATCH] D59253: [AIX][libcxx] AIX system headers need stdint.h and inttypes.h to be re-enterable when macro _STD_TYPES_T is defined

2019-05-23 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists added inline comments. Comment at: libcxx/include/stdint.h:16 +#endif // _STD_TYPES_T /* I don't think that this will do what you want it to. Is this a supported use case? ``` #include #define _STD_TYPES_T #include ``` Repository: rG LLVM

[PATCH] D68364: Prototype implementation of P0784R7: mark all members of std::allocator and std::allocator_traits as constexpr.

2019-10-03 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists added a comment. Thanks for doing this, Richard. A few things: - Needs tests (as you said) - The config macro stuff is all wrong (we build that file from a template) - Use `__libcpp_is_constant_evaluated` instead of `__builtin_is_constant_evaluated` because it doesn't have to be `#if

[PATCH] D45715: [libcxx] [test] Remove nonportable that errc::is_a_directory produces "Is a directory" from ios_base::failure tests

2018-04-23 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists added a comment. I'm fine with this change, but I'm wondering: - if there are similar tests in the filesystem test suite, and you haven't tripped over them because you spelled your error message the same as we did. - Should part of this test be moved into test/libcxx https://review

[PATCH] D41148: [libcxx] implement declarations based on P0214R7.

2018-04-23 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. Herald added a subscriber: bixia. This looks ready to land to me. Comment at: libcxx/test/std/experimental/simd/simd.traits/is_simd_mask.pass.cpp:122 +static_asser

[PATCH] D45470: Emit an error when mixing and

2018-04-24 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists added inline comments. Comment at: clang/test/Headers/stdatomic.cpp:4 + +#include + Is there a reason we want to test this twice - once in clang and once in libc++? We can use `expected-error` in libc++ tests to check the error. https://reviews.ll

[PATCH] D34331: func.wrap.func.con: Unset function before destroying anything

2018-04-24 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists accepted this revision. mclow.lists added a comment. Please move the tests into test/std and commit. https://reviews.llvm.org/D34331 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/c

[PATCH] D45179: [libc++] Add _LIBCPP_FORCE_NODISCARD define to force-enable nodiscard in pre-C++17

2018-04-24 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists added a comment. In https://reviews.llvm.org/D45179#1056183, @rjmccall wrote: > Is Marshall arguing that the standard doesn't allow compilers to warn about > failing to use these function results prior to C++17? Because I don't think > that's true; warnings are thoroughly non-norma

[PATCH] D45179: [libc++] Add _LIBCPP_FORCE_NODISCARD define to force-enable nodiscard in pre-C++17

2018-04-24 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists added a comment. In https://reviews.llvm.org/D45179#1077055, @thakis wrote: > So you're happy with this opt-in version? I'm happy with an opt-in mechanism, yes. This one is not quite right yet. BTW, I expect a //large// set of calls in the standard library to get marked as `[[nodi

[PATCH] D45179: [libc++] Add _LIBCPP_FORCE_NODISCARD define to force-enable nodiscard in pre-C++17

2018-04-24 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists added inline comments. Comment at: include/__config:1016 +// because GCC does not silence them via (void) cast. +#if __has_cpp_attribute(nodiscard) && _LIBCPP_STD_VER > 17 +# define _LIBCPP_NODISCARD [[nodiscard]] lebedev.ri wrote: > mclow.lists wrot

[PATCH] D41316: [libcxx] Allow random_device to be built optionally

2018-04-24 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists added a comment. In https://reviews.llvm.org/D41316#1054968, @efriedma wrote: > Yes, the standard says you're allowed to throw an exception from the > random_device constructor, or use a PRNG with an arbitrary seed, or even just > return zeros from operator(). But none of those beha

[PATCH] D45179: [libc++] Add _LIBCPP_FORCE_NODISCARD define to force-enable nodiscard in pre-C++17

2018-04-25 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists added inline comments. Comment at: test/libcxx/diagnostics/force_nodiscard.fail.cpp:22 + +_LIBCPP_NODISCARD_AFTER_CXX17 int foo() { return 6; } + Shouldn't this be just `_LIBCPP_NODISCARD` ? Repository: rCXX libc++ https://reviews.llvm.org/D4517

[PATCH] D45294: [libcxx] [test] Remove non-portable assertions from filebuf tests

2018-04-25 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 looks OK to me. https://reviews.llvm.org/D45294 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-

[PATCH] D45179: [libc++] Add _LIBCPP_FORCE_NODISCARD define to force-enable nodiscard in pre-C++17

2018-04-25 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists added inline comments. Comment at: test/libcxx/diagnostics/force_nodiscard.fail.cpp:22 + +_LIBCPP_NODISCARD_AFTER_CXX17 int foo() { return 6; } + lebedev.ri wrote: > mclow.lists wrote: > > Shouldn't this be just `_LIBCPP_NODISCARD` ? > > > I don't th

[PATCH] D45179: [libc++] Add _LIBCPP_FORCE_NODISCARD define to force-enable nodiscard in pre-C++17

2018-04-25 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists added a comment. BTW, you can gang several failing tests together, and check all the error messages - see libcxx/test/libcxx/containers/unord/unord.set/missing_hash_specialization.fail.cpp for an example. Repository: rCXX libc++ https://reviews.llvm.org/D45179 __

[PATCH] D48616: Implement LWG 2946, 3075 and 3076

2018-06-26 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists created this revision. mclow.lists added reviewers: EricWF, ldionne, STL_MSFT. A massive amount of doinking around in . https://cplusplus.github.io/LWG/issue2946 https://cplusplus.github.io/LWG/issue3075 https://cplusplus.github.io/LWG/issue3076 This is not quite right yet, but

[PATCH] D48616: Implement LWG 2946, 3075 and 3076

2018-06-26 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists added a comment. Ok, for some reason, the four tests that I *added* didn't get into the diff. https://reviews.llvm.org/D48616 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-comm

[PATCH] D48616: Implement LWG 2946, 3075 and 3076

2018-06-26 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists updated this revision to Diff 152995. mclow.lists added a comment. Remove a bunch of `noexcept`s that I missed the first time. Put in an error message to be checked in one of the failing deduction cases that was lacking it. Address STL's comments. https://reviews.llvm.org/D48616 F

[PATCH] D48616: Implement LWG 2946, 3075 and 3076

2018-06-26 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists updated this revision to Diff 153001. mclow.lists added a comment. Updated the `__is_allocator` type trait to work all the way back to C++03 Added a bunch of tests from issue2946. I think this has all the pieces that it needs now. https://reviews.llvm.org/D48616 Files: include/me

[PATCH] D48616: Implement LWG 2946, 3075 and 3076

2018-06-27 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists added inline comments. Comment at: test/std/strings/basic.string/string.ops/string_rfind/string_size.pass.cpp:161 +std::string s = " !"; +assert(s.rfind({"abc", 1}) == std::string::npos); +} These tests don't work in C++03; they'll need t

[PATCH] D48616: Implement LWG 2946, 3075 and 3076

2018-06-27 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists updated this revision to Diff 153097. mclow.lists added a comment. Update the tests from 2946 - they are removed for C++03 https://reviews.llvm.org/D48616 Files: include/memory include/string test/std/strings/basic.string/string.cons/copy_assignment.pass.cpp test/std/strings

[PATCH] D48616: Implement LWG 2946, 3075 and 3076

2018-06-27 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists added inline comments. Comment at: include/string:842 +explicit basic_string(const _Tp& __t, + typename enable_if<__can_be_converted_to_string_view<_CharT, _Traits, _Tp>::value, void>::type* = 0); + ldionne wrote: > Is th

[PATCH] D48616: Implement LWG 2946, 3075 and 3076

2018-06-27 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists marked 5 inline comments as done. mclow.lists added inline comments. Comment at: include/memory:5647 + typename __void_t::type, + typename __void_t().allocate(size_t(0)))>::type + > ldionne wrote: > Sorry -- still not very fluent with

[PATCH] D48616: Implement LWG 2946, 3075 and 3076

2018-06-27 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists updated this revision to Diff 153178. mclow.lists marked 2 inline comments as done. mclow.lists added a comment. Update diff per Louis' suggestion. Remove noexcepts from the synopsis. https://reviews.llvm.org/D48616 Files: include/memory include/string test/std/strings/basic.s

[PATCH] D48680: Add missing visibility annotation for __base

2018-06-27 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists added a comment. Sorry - what problem is this solving? Repository: rCXX libc++ https://reviews.llvm.org/D48680 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D48616: Implement LWG 2946, 3075 and 3076

2018-06-28 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists marked 5 inline comments as done. mclow.lists added inline comments. Comment at: include/string:836 _LIBCPP_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS -basic_string(const _Tp& __t, size_type __pos, size_type __n, - const allocator_

[PATCH] D48616: Implement LWG 2946, 3075 and 3076

2018-06-28 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists updated this revision to Diff 153432. mclow.lists marked 3 inline comments as done. mclow.lists added a comment. Update in response to comments. https://reviews.llvm.org/D48616 Files: include/memory include/string test/std/strings/basic.string/string.cons/copy_assignment.pass.

[PATCH] D48342: [libcxx] Optimize vectors construction of trivial types from an iterator range with const-ness mismatch.

2018-06-29 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists added a comment. I want to point out that this code (not -necessarily- this patch, but where it lives) needs to be rewritten. There is no prohibition on users specializing `allocator_traits` for their allocators, and yet libc++'s vector depends on the existence of `allocator_traits

[PATCH] D48616: Implement LWG 2946, 3075 and 3076

2018-07-02 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists closed this revision. mclow.lists added a comment. Committed as revision 336132. https://reviews.llvm.org/D48616 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D41376: [libcxx] Implement ABI for Clang/GCC vector extension, constructors, copy_from and copy_to.

2018-07-09 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists added a comment. Looks good; a bunch of minor things. Remember to target c++17. You need to indulge your OCD when writing the tests. Comment at: libcxx/include/__config:1329 +#if !defined(_LIBCPP_COMPILER_CLANG) && !defined(_LIBCPP_COMPILER_GCC) +#define _LIBCPP_H

[PATCH] D44663: [libcxx] Update with R9 changes

2018-07-09 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists added a comment. A few comments; more to come after the earlier patches land. Comment at: libcxx/include/experimental/simd:1429 +struct deduce<_Tp, _Np, __simd_abi<__kind, __old_size>...> { + using type = __simd_abi<__kind, _Np>; +}; Is this delibe

[PATCH] D41458: [libc++][C++17] Elementary string conversions for integral types

2018-07-09 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists added inline comments. Comment at: .gitignore:7 *.so +*.core + I'm pretty sure this file doesn't belong in this diff. Comment at: include/charconv:89 +_LIBCPP_BEGIN_NAMESPACE_STD + +enum class _LIBCPP_ENUM_VIS chars_format

[PATCH] D49118: [libc++] P0898R3 1 of 12: changes to common_type; implement common_reference

2018-07-10 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists added a comment. > I've conservatively hidden everything behind _LIBCPP_STD_VER > 17, although > it could be made available in C++11 mode with some edits. If we have a use for this in pre c++2a code, the libc++ convention would be to implement `__common_reference` that works most

[PATCH] D49338: Implement - P0122R7

2018-07-13 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists added inline comments. Comment at: include/span:236 +_LIBCPP_INLINE_VISIBILITY constexpr span(pointer __ptr, index_type __count) : __data{__ptr} +{ assert(_Extent == __count); } +_LIBCPP_INLINE_VISIBILITY constexpr span(pointer __f, pointer __l) : __

[PATCH] D49338: Implement - P0122R7

2018-07-16 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists added a comment. Need to add an entry to `include/CMakeLists.txt` as well. https://reviews.llvm.org/D49338 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D41458: [libc++][C++17] Elementary string conversions for integral types

2018-07-16 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists added inline comments. Comment at: include/charconv:372 + +auto __len = __last - __p; +if (__value != 0 || !__len) Are you missing an edge case here? What happens if `__last == __first && __value == 0`? Comment at: test/su

[PATCH] D41458: [libc++][C++17] Elementary string conversions for integral types

2018-07-16 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists added inline comments. Comment at: include/charconv:244 +static _LIBCPP_INLINE_VISIBILITY char const* +read(char const* __p, char const* __ep, type& __a, type& __b) +{ Same comment as above about `read` and `inner_product` - they need to b

[PATCH] D41458: [libc++][C++17] Elementary string conversions for integral types

2018-07-16 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists added inline comments. Comment at: include/charconv:359 +auto __gen_digit = [](_Tp __c) { +return "0123456789abcdefghijklmnopqrstuvwxyz"[__c]; +}; Thinking some more - did this used to do more? Because I don't see why having a lambda

[PATCH] D41458: [libc++][C++17] Elementary string conversions for integral types

2018-07-16 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists added inline comments. Comment at: include/charconv:372 + +auto __len = __last - __p; +if (__value != 0 || !__len) mclow.lists wrote: > Are you missing an edge case here? What happens if `__last == __first && > __value == 0`? > Nevermind. Ap

[PATCH] D41458: [libc++][C++17] Elementary string conversions for integral types

2018-07-16 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists added inline comments. Comment at: include/charconv:244 +static _LIBCPP_INLINE_VISIBILITY char const* +read(char const* __p, char const* __ep, type& __a, type& __b) +{ lichray wrote: > mclow.lists wrote: > > Same comment as above about `re

[PATCH] D41412: [libcxx] implement concat() and split()

2018-07-17 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists added inline comments. Herald added subscribers: bixia, jlebar. Comment at: libcxx/include/experimental/simd:994 + +// NOTE: _Abis... is the extension proposed by P0820, allowing the APIs to +// propagate _StorageKind during transforming input type(s) to the output ty

[PATCH] D49504: Enable C++2a Chrono Literals

2018-07-18 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists added a comment. This looks ok to me - I'm assuming that somewhere there's a test for `int foo = 0x123d`, so we're sure that didn't get broken. Comment at: test/SemaCXX/cxx2a-user-defined-literals.cpp:8 +namespace std { + struct string {}; + namespace chrono { --

[PATCH] D80743: (PR46111) Desugar Elaborated types in Deduction Guides.

2020-06-03 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists added a comment. I've got nothing to say here. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D80743/new/ https://reviews.llvm.org/D80743 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://list

<    1   2   3   4   5   >