[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] D40586: Implement p0457r2 - String Prefix and Suffix Checking

2017-11-28 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists created this revision. This adds six calls each to `basic_string` and `basic_string_view`: - starts_with (3 variants) - ends_with (3 variants) This is a C++2a feature https://reviews.llvm.org/D40586 Files: include/string include/string_view test/std/strings/basic.string/stri

[PATCH] D40586: Implement p0457r2 - String Prefix and Suffix Checking

2017-11-28 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists added a comment. Sorry for the extra bits. Comment at: include/string:1365 static _LIBCPP_INLINE_VISIBILITY size_type __recommend(size_type __s) _NOEXCEPT +{ This is a leftover change. Disregard this bit. Comment

[PATCH] D40586: Implement p0457r2 - String Prefix and Suffix Checking

2017-11-28 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists added inline comments. Comment at: include/string:309 + bool ends_with(charT c) const noexcept; + bool ends_with(const charT* s) const; + rsmith wrote: > The indentation here seems off. Should these have a `// C++2a` comment? I may have le

[PATCH] D40586: Implement p0457r2 - String Prefix and Suffix Checking

2017-11-28 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists updated this revision to Diff 124677. mclow.lists added a comment. Wrapped the `string_view` bits in #ifdef for C++2a. De-tabbed. https://reviews.llvm.org/D40586 Files: include/string include/string_view test/std/strings/basic.string/string.ends_with/ends_with.char.pass.cpp

[PATCH] D40586: Implement p0457r2 - String Prefix and Suffix Checking

2017-11-28 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists added inline comments. Comment at: include/string_view:577 + bool starts_with(basic_string_view __s) const _NOEXCEPT + { return size() >= __s.size() && compare(0, __s.size(), __s) == 0; } + rsmith wrote: > mclow.lists wrote: > > rsmith wro

[PATCH] D40651: Implement most of P0451 - Constexpr for std::complex

2017-11-30 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists created this revision. This patch implements most of https://wg21.link/P0451r1 - the notable exception being division. The current implementation of complex division in libc++ uses `logb`, `fmax`, and a couple of other primitives that are not constexpr. The paper has some approaches

[PATCH] D40586: Implement p0457r2 - String Prefix and Suffix Checking

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

[PATCH] D28253: static_assert inside make_shared when the object is not constructible

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

[PATCH] D41048: [libcxx] workaround PR 28385 in __find_exactly_one_checked

2017-12-10 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists added a comment. These tests don't fail for me. (using a clang I built two days ago) https://reviews.llvm.org/D41048 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D41048: [libcxx] workaround PR 28385 in __find_exactly_one_checked

2017-12-10 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists added inline comments. Comment at: include/tuple:1015 struct __find_exactly_one_checked { - static constexpr bool __matches[] = {is_same<_T1, _Args>::value...}; +#if defined(__clang__) && __clang_major__ > 5 && __cplusplus > 201402L +// Workaround https://bugs.l

[PATCH] D41048: [libcxx] workaround PR 28385 in __find_exactly_one_checked

2017-12-10 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists added a comment. Ah - that was the factor I was missing. The tests pass for me with `-std=c++2a`, but fail for `std=c++17` Casey's original post said they fail with `2a`, and I'm *still* not seeing that. https://reviews.llvm.org/D41048

[PATCH] D41064: Suppress -Wuser-defined-literals for and

2017-12-11 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. In https://reviews.llvm.org/D41064#950946, @aaron.ballman wrote: > I think that it would be more appropriate to fix this in Clang rather than > libc++. For instance, we don

[PATCH] D40991: [libcxx] [test] Fix line endings, avoid unnecessary non-ASCII.

2017-12-11 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists added a comment. Except for the stuff in TODO.txt these look good to me. We need to do some work on that file - it's pretty out of date. https://reviews.llvm.org/D40991 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists

[PATCH] D40743: Make rehash(0) work with ubsan's unsigned-integer-overflow.

2017-12-11 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists added a comment. Dan - I think I need a bit more context here. How does UBSan get triggered? Repository: rCXX libc++ https://reviews.llvm.org/D40743 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin

[PATCH] D40707: [libcxx] Fix basic_stringbuf constructor

2017-12-11 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists added a comment. This looks good to me; with a couple of nits. Comment at: test/std/input.output/string.streams/stringbuf/stringbuf.cons/default.pass.cpp:26 +{ +assert(this->eback() == 0); +assert(this->gptr() == 0); Not zero, p

[PATCH] D41030: [libcxx] [test] Fix MSVC warnings, null pointer deref.

2017-12-12 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists added a comment. > Avoid MSVC "warning C4293: '<<': shift count negative or too big, undefined > behavior". > MSVC sees (1ULL << N) and warns - being guarded by const bool canFit is > insufficient. A small change to the code Your compiler needs to either (a) get much smarter about

[PATCH] D41030: [libcxx] [test] Fix MSVC warnings, null pointer deref.

2017-12-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. These look fine to me. Thanks for the attention to detail. https://reviews.llvm.org/D41030 ___ cfe-commits mailing list cfe-commits@li

[PATCH] D40991: [libcxx] [test] Fix line endings, avoid unnecessary non-ASCII.

2017-12-12 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists added a comment. > Thanks, I've checked this in without the changes to TODO.TXT Thanks - that works for me. https://reviews.llvm.org/D40991 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/li

[PATCH] D40707: [libcxx] Fix basic_stringbuf constructor

2017-12-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. LGTM. Do you need someone to commit it? https://reviews.llvm.org/D40707 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http:/

[PATCH] D33776: [libcxx] LWG2221: No formatted output operator for nullptr

2017-12-13 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists added a comment. Other than the actual text being output, this LGTM. I'ld like to see the changes I suggested in the test go in, but they're really minor. Comment at: include/ostream:225 +basic_ostream& operator<<(nullptr_t) +{ return *this << (const void*)

[PATCH] D67052: Add reference type transformation builtins

2019-09-03 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists added a comment. If you're going to do `__add__lvalue_reference`, `__add_rvalue_reference`, and `__remove_reference`, why not go all the way and add `__is_reference`, `__is_lvalue_reference` and `__is_rvalue_reference`? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTI

[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] D108003: [Clang] Extend -Wbool-operation to warn about bitwise and of bools with side effects

2021-08-12 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists added a comment. I suggest you take all the techniques at http://graphics.stanford.edu/~seander/bithacks.html and make sure they don't cause a warning. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D108003/new/ https://reviews.llvm.org/D108003 _

[PATCH] D69520: [libc++] Disallow dynamic -> static span conversions

2019-11-01 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists added inline comments. Comment at: libcxx/test/std/containers/views/span.cons/span.fail.cpp:78 - -// Try to remove const and/or volatile (static -> static) -{ Ok. The comment here is wrong; this is testing dynamic -> static. However, why are you

[PATCH] D69292: Proposal to add -Wtautological-compare to -Wall

2019-11-14 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists added a comment. Sorry I'm late to the party; I've been traveling for 3+ weeks. I would like to be reassured that the following code will not warn: ` long foo = ...; // some calculation if (foo < std::numeric_limits::min() || foo > std::numeric_limits::max()) . This is imp

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

2018-03-21 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists added a comment. Sorry I've let this lie fallow for so long. Comment at: include/charconv:234 +to_chars(char* __first, char* __last, _Tp __value, int __base) +-> to_chars_result +{ Why use the trailing return type here? I don't see any advantage

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

2018-03-21 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists added a comment. A few small comments... Comment at: libcxx/include/functional:1821 { -if ((void *)__f_ == &__buf_) -__f_->destroy(); -else if (__f_) -__f_->destroy_deallocate(); -__f_ = 0; +function::operator=(nullptr); if (__f

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

2018-03-21 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists added a comment. I'm going to stop here, because all the things I've noted are ticky-tack; formatting and minor changes. More substantial comments coming soon. Comment at: libcxx/include/experimental/simd:40 +template inline constexpr bool is_abi_tag_v = is_abi_ta

[PATCH] D44823: [libcxx] Improving std::vector and std::deque perfomance

2018-03-26 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. Please don't commit this. Comment at: libcxx/trunk/include/__split_buffer:201 __alloc_rr& __a = this->__alloc(); +pointer __to_be_end = this->__e

[PATCH] D45163: [Sema] -Wunused-value: diagnose unused std::move() call results.

2018-04-02 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists added a comment. So. https://bugs.llvm.org/show_bug.cgi?id=10011 was resolved by https://wg21.link/P0600 (which added `[[nodiscard]]` to `string.empty()` We can do the same for `move`. However, I have been promised a comprehensive paper listing all the (100s?) of places in the stand

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

2018-04-02 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists added a comment. [rand.device]/2 seems to be the authoritative word here: If implementation limitations prevent generating nondeterministic random numbers, the implementation may employ a random number engine. https://reviews.llvm.org/D41316 ___

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

2018-04-04 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists added a comment. When you add a new header file to libc++, you have to update two additional files: - include/module.modulemap - test/libcxx/double_include.sh.cpp See http://llvm.org/viewvc/llvm-project?view=revision&revision=329144 for an example of how to do this.

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

2018-04-04 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists added inline comments. Comment at: libcxx/test/std/experimental/simd/simd.traits/is_abi_tag.pass.cpp:44 +static_assert(is_abi_tag>::value, ""); +static_assert(is_abi_tag>::value, ""); + Needs negative tests. Comment at: libcxx/test

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

[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 http://li

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

[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&r2=315873&pathrev=315874 https://reviews.llvm.org/

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

[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 test/std/languag

[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: > efried

[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) https://reviews.l

[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 test/std/language.support/sup

[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 tcanens wrote: > Te

[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 test/std/lan

[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);` https

[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] 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 test/std/language.support/support.dynamic/ptr.launder/launder.nodis

[PATCH] D28217: [libc++] Overallocation of am_pm array in locale.cpp

2017-01-03 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists added a comment. This looks fine to me. All the other places that use this (or related functionality) have a rank of 2. Interestingly enough, this has been there since "the beginning of time" (the initial import of libc++ into the LLVM subversion repo) https://reviews.llvm.org/D2

[PATCH] D28223: clean up use of _WIN32

2017-01-03 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists added a comment. I like this. A lot. I'm a bit concerned about @smeenai 's comments about __LP64_, and @EricWF 's comment about solaris. This patch accomplishes (or maybe just moves closer, I need to check) to a goal of mine, which is to have no references to `_WIN32` in any heade

[PATCH] D28223: clean up use of _WIN32

2017-01-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. LGTM. My comment is a suggestion, not a requirement. Comment at: include/support/win32/support.h:112 // Search from LSB to MSB for first set bit. // Returns zero

[PATCH] D28253: static_assert inside make_shared when the object is not constructible

2017-01-03 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists created this revision. mclow.lists added a reviewer: EricWF. mclow.lists added a subscriber: cfe-commits. http://llvm.org/show_bug.cgi?id=28929 shows a scenario where `make_shared` of a class with a protected constructor compiles successfully (it should fail). This is because we appl

[PATCH] D28253: static_assert inside make_shared when the object is not constructible

2017-01-03 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists added inline comments. Comment at: test/libcxx/test/config.py:415 self.cxx.compile_flags += ['-I' + cxx_headers] +if self.libcxx_obj_root is None: +return Whoops. This change doesn't belong here. But it fixes a problem run

[PATCH] D28131: [libcxx] Fix PR31402: map::__find_equal_key has undefined behavior.

2017-01-05 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists added inline comments. Comment at: include/__tree:1400 __parent_pointer& __parent, const key_type& __v); +// FIXME: Make this function const qualified. Unfortunetly doing so +// breaks existing code which uses non-const callable comparator

[PATCH] D26667: Teach clang that 'sv' is a fine literal suffix

2017-01-09 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists abandoned this revision. mclow.lists added a comment. This was resolved by https://reviews.llvm.org/D26829 https://reviews.llvm.org/D26667 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/list

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

2017-01-09 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists created this revision. mclow.lists added reviewers: EricWF, rsmith. mclow.lists added a subscriber: cfe-commits. Make `assign`/`length`/`find`/`compare` for `std::char_traits` constexpr. This makes using `string_view`s at compile time easier. Use the compiler intrinsics when availabl

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

2017-01-09 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists added inline comments. Comment at: include/__string:261 + +// inline _LIBCPP_CONSTEXPR_AFTER_CXX14 +// int I will remove this block before committing. https://reviews.llvm.org/D28473 ___ cfe-commits ma

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

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

[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). https://reviews.

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

[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` and

[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 non-varia

[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. https://revie

[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 test/std/conta

[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 !d

[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-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 test/l

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

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

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

2017-03-23 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] 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 http://lists.llvm.org/cgi-bin/mailman/list

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

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

[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] 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] 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 test/std/utili

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

[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] 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 other infinity-related

[PATCH] D24991: Inline hot functions in libcxx shared_ptr implementation.

2017-01-16 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists added inline comments. Comment at: libcxx/include/memory:3700 + +template +inline T `template `, please. Otherwise when some client code does `#define T true` (yes, I've seen that!) this breaks. `_Tp` is a reserved identifier, and if they use that

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

2017-01-16 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists added a comment. > there's probably a better way to state `_LIBCPP_STD_VER <= 14 || > defined(_LIBCPP_NO_REMOVE_AUTO_PTR)`. There probably is; but remember, we want to make it so someone can `-D_LIBCPP_NO_REMOVE_AUTO_PTR` on the command-line and get this back. > I would love to hav

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

2017-01-16 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists updated this revision to Diff 84593. mclow.lists added a comment. Updated the macro name. Use REQUIRES-ALL Found a couple more tests that needed to be updated. Fixed the libcxx/test bit. https://reviews.llvm.org/D20660 Files: include/memory test/libcxx/depr/depr.auto.ptr/auto.pt

[PATCH] D28931: Disable aligned new/delete on Apple platforms without posix_memalign

2017-01-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. Thanks! https://reviews.llvm.org/D28931 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mai

[PATCH] D28933: Revert the return type for `emplace_(back|front)` to `void` in C++14 and before

2017-01-19 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists created this revision. In C++11/14, the return type of `emplace_front` and `emplace_back` was `void`. In http://wg21.link/p0084, Alan Talbot proposed changing the return type to return a reference to the newly created element. We implemented that - but unilaterally. This changes th

[PATCH] D26110: Add a check for GCC to the _LIBCPP_EXPLICIT define

2017-01-23 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists added a comment. Ok, this is weird. It looks like the changes to <__config> got committed, but not the test. https://reviews.llvm.org/D26110 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/l

[PATCH] D28981: Use GNU-style attributes for several __throw_XXX() functions

2017-01-23 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists added a comment. > In https://reviews.llvm.org/rL279744, __throw_XXX() functions were > introduced, partially for compatibility with software compiled against > libstdc++. You're working from a false premise. These functions were not added for compatibility with libstdc++, but rat

[PATCH] D28981: Use GNU-style attributes for several __throw_XXX() functions

2017-01-23 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists added a comment. > It would be nice to have some way of making them semi-compatible. I'm afraid I disagree. If we make them something that people can "count on", then we have to support them. The whole point of names that start with `__` (or `_[A-Z]` are that they are internal, imp

[PATCH] D29063: [libcxx] Never use within libc++

2017-01-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. this LGTM. assert is not something we should have in the dylib. Comment at: include/__config:827 # endif +# if !defined(_LIBCPP_BUILDING_LIBRARY) # define _

[PATCH] D28933: Revert the return type for `emplace_(back|front)` to `void` in C++14 and before

2017-01-24 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 revision 292990. https://reviews.llvm.org/D28933 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.or

[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] 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 https://reviews.llvm.org/D34574

[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++ :: std/language.support/support.

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

[PATCH] D41976: Low-hanging fruit optimization in string::__move_assign().

2018-01-13 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists added a comment. Can you share your benchmark results, please? https://reviews.llvm.org/D41976 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D41976: Low-hanging fruit optimization in string::__move_assign().

2018-01-16 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists added a comment. I'm a bit leery of this patch. Not because of what it's trying to do, but rather, the introduction of a method `__clear_and_shrink` that leaves the string in an invalid state. For all the uses that you put it to, I don't think that's a problem (though I'm still w

[PATCH] D42242: Make libc++abi work with gcc's ARM unwind library

2018-01-18 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists created this revision. mclow.lists added a reviewer: EricWF. Herald added subscribers: kristof.beyls, aemerson. See https://bugs.llvm.org/show_bug.cgi?id=35945, which reports that libc++ doesn't build for the Raspberry PI. The problem is that the exception class is defined as a `char

<    1   2   3   4   5   >