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

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

[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] 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 test/std/numerics/numeric.ops/reduce/reduce_iter_iter.

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

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

[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] 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 test/std/numerics/numeric.ops/exclusive.scan/exc

[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". //Require

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

[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 test/std/numerics/numeric.ops/exclusive.scan/exclusiv

[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 test/std/numerics/numeric.ops/ex

[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 test/std/numerics/numeric.ops/reduce/reduce_iter_iter.pass

[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] 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 ___ cfe-co

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

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

[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] 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] D40743: Make rehash(0) work with ubsan's unsigned-integer-overflow.

2017-12-14 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:2141 __n = 2; else if (__n & (__n - 1)) __n = __next_prime(__n); danalbert wrote: > Wit

[PATCH] D41239: Turn a config macro (_LIBCPP_HAS_NO_INLINE_VARIABLES) into an attribute macro (_LIBCPP_INLINE_VAR)

2017-12-14 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists created this revision. mclow.lists added a reviewer: EricWF. We're going to be defining a lot of inline variables going forward, and the current way of doing it is ... long-winded. Add an attribute macro which we can put everywhere we need, and handles the conditional. Instead of wr

[PATCH] D41239: Turn a config macro (_LIBCPP_HAS_NO_INLINE_VARIABLES) into an attribute macro (_LIBCPP_INLINE_VAR)

2017-12-14 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists added a comment. There are no tests because this should not change any functionality. https://reviews.llvm.org/D41239 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2017-12-14 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists updated this revision to Diff 126986. mclow.lists added a comment. More context in the diff, and removed some tabs. Also commented out the constexpr tests for divide, since they fail at the moment. https://reviews.llvm.org/D40651 Files: include/complex test/std/numerics/complex

[PATCH] D41223: [libc++] Fix PR35491 - std::array of zero-size doesn't work with non-default constructible types.

2017-12-15 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists added a comment. I'm wondering if it's not a better idea to have an explicit specialization for size == 0 template class array { // and so on. }; https://reviews.llvm.org/D41223 ___ cfe-commits mailing list cfe-commits@lists.l

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

2017-12-18 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists added a comment. In https://reviews.llvm.org/D39149#958378, @bcain wrote: > Let's resurrect these changes since https://reviews.llvm.org/D39462 was not > the right short-term approach. Let's not. IMHO, these changes are: - a bad idea in principle - clang should not be warning her

[PATCH] D41372: [libcxx] Fix transform_reduce mishandling move-only types, and nonstandard macro use in tests.

2017-12-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. The rest of this LGTM. Comment at: test/std/numerics/numeric.ops/transform.reduce/transform_reduce_iter_iter_iter_init.pass.cpp:61 +inline MoveOnly operator+(con

[PATCH] D41368: [libc++] Ignore bogus tautologic comparison warnings

2017-12-19 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists added a comment. In https://reviews.llvm.org/D41368#958865, @zturner wrote: > It would be better if we could just fix the code. I disagree (See discussion of https://reviews.llvm.org/D39149). Even if it was "just this one place" (which it isn't), this affects users of clang, not ju

[PATCH] D41319: libcxx: Fix for basic_stringbuf::seekoff() after r320604.

2017-12-19 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists added inline comments. Comment at: libcxx/include/sstream:580 return pos_type(-1); +ptrdiff_t __hm = __hm_ == nullptr ? 0 : __hm_ - __str_.data(); off_type __noff; This can be const. https://reviews.llvm.org/D41319 _

[PATCH] D41319: libcxx: Fix for basic_stringbuf::seekoff() after r320604.

2017-12-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. I'm going to sprinkle `const` throughout this file later, but that is a drive-by thing. All the lines that start out `ptrdiff_t __hm = ` will soon be `const ptrdiff_t __hm = `

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

2017-12-20 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists added a comment. I've got an implementation for this, too - at https://github.com/mclow/snippets/blob/master/to_chars.cpp I'll compare them. Repository: rCXX libc++ https://reviews.llvm.org/D41458 ___ cfe-commits mailing list cfe-co

[PATCH] D41498: [libcxx] Add clang negative thread safety assertions to std::mutex

2017-12-21 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists added inline comments. Comment at: include/__mutex_base:65 void unlock() _NOEXCEPT _LIBCPP_THREAD_SAFETY_ANNOTATION(release_capability()); +#ifdef _LIBCPP_HAS_THREAD_SAFETY_ANNOTATIONS +const mutex& operator!() const { return *this; } We don

[PATCH] D41239: Turn a config macro (_LIBCPP_HAS_NO_INLINE_VARIABLES) into an attribute macro (_LIBCPP_INLINE_VAR)

2018-01-02 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists abandoned this revision. mclow.lists added a comment. This was committed as part of r321658 https://reviews.llvm.org/D41239 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commit

[PATCH] D41748: [libcxx] [test] Fix Xxx_scan tests using nonstandard things and MSVC++ warnings

2018-01-05 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists added a comment. > The use of iota targeting vector with an int parameter > triggers warnings on MSVC++ assigning an into a unsigned char& I hate your compiler. Other than that (and the bit about identity), this looks fine to me. Comment at: test/std/numerics/nu

[PATCH] D41830: [libc++] Fix PR#35780 - make std::experimental::filesystem::remove and remove_all return false or 0 if the file doesn't exist

2018-01-09 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists added inline comments. Comment at: src/experimental/filesystem/operations.cpp:666 if (::remove(p.c_str()) == -1) { -set_or_throw(ec, "remove", p); +if (ec != nullptr && *ec != errc::no_such_file_or_directory) +set_or_throw(ec, "remove"

[PATCH] D41830: [libc++] Fix PR#35780 - make std::experimental::filesystem::remove and remove_all return false or 0 if the file doesn't exist

2018-01-09 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists added inline comments. Comment at: src/experimental/filesystem/operations.cpp:699 auto count = remove_all_impl(p, mec); if (mec) { +if (mec != errc::no_such_file_or_directory) { I don't think that this is quite right, either. In the

[PATCH] D41213: [libcxx] [test] Improve MSVC portability.

2018-01-09 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists added a comment. > According to 15.8.2 [class.copy.assign]/2 and /4, this makes call_wrapper > non-assignable. Then I think we've got a LWG issue, because that's not what I remember the intent to have been. https://reviews.llvm.org/D41213 ___

[PATCH] D41213: [libcxx] [test] Improve MSVC portability.

2018-01-09 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists added a comment. Investigating the assignability of `not_fn`. All the rest of this looks fine. https://reviews.llvm.org/D41213 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-com

[PATCH] D41830: [libc++] Fix PR#35780 - make std::experimental::filesystem::remove and remove_all return false or 0 if the file doesn't exist

2018-01-10 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists added a comment. I like the fact that you've removed the extra test that you've added. However, I think that modifying the tests as you've done is more work than is needed. I *suspect* that all you need to do is to move a couple of test cases from the "calls which should fail" to the

[PATCH] D41830: [libc++] Fix PR#35780 - make std::experimental::filesystem::remove and remove_all return false or 0 if the file doesn't exist

2018-01-10 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists added inline comments. Comment at: test/std/experimental/filesystem/fs.op.funcs/fs.op.remove/remove.pass.cpp:67 non_empty_dir, -file_in_bad_dir, +// file_in_bad_dir, // produces "St13exception_ptruncaught_exceptions not yet implemented"

[PATCH] D41830: [libc++] Fix PR#35780 - make std::experimental::filesystem::remove and remove_all return false or 0 if the file doesn't exist

2018-01-10 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists added inline comments. Comment at: test/std/experimental/filesystem/fs.op.funcs/fs.op.remove/remove.pass.cpp:67 non_empty_dir, -file_in_bad_dir, +// file_in_bad_dir, // produces "St13exception_ptruncaught_exceptions not yet implemented"

[PATCH] D40677: [libcxx] Make std::basic_istream::get 0-terminate input array in case of error.

2018-01-11 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists added a comment. A couple of nits, but other than that, looks fine. Comment at: libcxx/include/istream:970 } +if (__n > 0) +{ I'm not a big fan of "putting braces around single statement blocks", and (see line 963) that doe

[PATCH] D40677: [libcxx] Make std::basic_istream::get 0-terminate input array in case of error.

2018-01-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. Please make the formatting match the rest of the file. Comment at: libcxx/test/std/input.output/iostream.format/input.streams/istream.unformatted/get_pointer_size_

[PATCH] D41830: [libc++] Fix PR#35780 - make std::experimental::filesystem::remove and remove_all return false or 0 if the file doesn't exist

2018-01-11 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists added inline comments. Comment at: test/std/experimental/filesystem/fs.op.funcs/fs.op.remove/remove.pass.cpp:67 non_empty_dir, -file_in_bad_dir, +// file_in_bad_dir, // produces "St13exception_ptruncaught_exceptions not yet implemented"

[PATCH] D41830: [libc++] Fix PR#35780 - make std::experimental::filesystem::remove and remove_all return false or 0 if the file doesn't exist

2018-01-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. Do you need me to commit this? https://reviews.llvm.org/D41830 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://li

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

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

[PATCH] D41958: Create a deduction guide for basic_string

2018-01-11 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists created this revision. mclow.lists added a reviewer: EricWF. First of the C++17 deduction guides (I think). Uses the new `__is_allocator` trait. The failing test is not quite right yet, but the success bits all work. https://reviews.llvm.org/D41958 Files: include/string test/st

[PATCH] D43773: Implement the container bits of P0805R1

2018-03-01 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists updated this revision to Diff 136582. mclow.lists added a comment. Add the `tuple` bits. Regularize the equality comparisons of the containers; i.e, don't try to be clever - let the compiler be clever. https://reviews.llvm.org/D43773 Files: include/array include/deque include

[PATCH] D41958: Create a deduction guide for basic_string

2018-03-06 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists closed this revision. mclow.lists added a comment. This was landed as r324619 https://reviews.llvm.org/D41958 ___ 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`

2018-03-07 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists updated this revision to Diff 137474. mclow.lists added a comment. Added the proposed resolution for https://wg21.link/lwg3075 as well, and some deduction guide tests for `string_view` https://reviews.llvm.org/D37994 Files: include/string test/std/strings/basic.string/string.co

[PATCH] D44263: Implement LWG 2221 - No formatted output operator for nullptr

2018-03-08 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists created this revision. mclow.lists added reviewers: EricWF, dexonsmith. https://cplusplus.github.io/LWG/issue2221 This is straightforward; I'm putting it up for review because it will add symbols to the dylib https://reviews.llvm.org/D44263 Files: include/ostream test/std/inp

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

2018-03-08 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists added a comment. In https://reviews.llvm.org/D41976#1031674, @vsk wrote: > @mclow.lists is this still fine to commit? I can land it and watch the bots, > if you'd like. Sure. Please do so. https://reviews.llvm.org/D41976 ___ cfe-comm

[PATCH] D40775: [libcxx] Add underscores to win32 locale headers.

2018-03-19 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists added a comment. We don't usually do this in source files, because they don't get included in people's builds - just the library build. if you look in src/mutex.cpp, you'll see stuff like: `void __call_once(volatile unsigned long& flag, void* arg, void(*func)(void*))` On the other h

[PATCH] D47987: Provide only one declaration of __throw_runtime_error

2018-06-14 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists added a comment. I'm not really happy with gcc's redundant declaration warnings; I think they're "nannying" rather than useful. That being said, why not just remove the declaration in `__locale`? `__locale` includes `string`, which includes `stdexcept`. Repository: rCXX libc++ h

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

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

[PATCH] D51762: First part of the calendar stuff

2018-10-12 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists added a comment. This is the first of part of this functionality. Some of these bits are not here yet. Comment at: test/std/utilities/time/time.cal/time.cal.ymwd/time.cal.ymwd.members/ctor.sys_days.pass.cpp:10 +// UNSUPPORTED: c++03, c++11, c++14, c++17 +// XFAIL

[PATCH] D51762: First part of the calendar stuff

2018-10-15 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists accepted this revision. mclow.lists added a comment. After discussions with @EricWF, I landed a modified version as revision 344529. https://reviews.llvm.org/D51762 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llv

[PATCH] D51762: First part of the calendar stuff

2018-10-15 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists added a comment. In https://reviews.llvm.org/D51762#1266086, @NoQ wrote: > Had to revert. Sorry! https://reviews.llvm.org/rL344580. > > This failure was masked by another error, so i guess it was missed. This was supposed to be fixed by commit r344535. https://reviews.llvm.org/D51

[PATCH] D53763: [libc++] [test] Fix logic error in tests; enable for MSVC previews

2019-01-14 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. I'm a bit concerned about the `TEST_HAS_NO_SPACESHIP_OPERATOR` and how it tracks with `_LIBCPP_HAS_NO_SPACESHIP_OPERATOR`, but I'm not going to hold this up for that. CHANGES SINCE

[PATCH] D51762: First part of the calendar stuff

2019-01-14 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists marked 2 inline comments as done. mclow.lists added inline comments. Comment at: include/chrono:2667 +#if _LIBCPP_STD_VER > 17 +constexpr chrono::day operator ""d(unsigned long long __d) noexcept +{ EricWF wrote: > Including this file with Cla

[PATCH] D56905: [libunwind] [SjLj] Don't use __declspec(thread) in MinGW mode

2019-01-18 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists accepted this revision. mclow.lists added a comment. Sigh. At least we've got a macro wrapping this; we only have to pore over this once. Repository: rUNW libunwind CHANGES SINCE LAST ACTION https://reviews.llvm.org/D56905/new/ https://reviews.llvm.org/D56905 __

[PATCH] D57001: [libunwind] Don't define unw_fpreg_t to uint64_t for __ARM_DWARF_EH__

2019-01-23 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists added a comment. I have no problem with the code change, but no context on whether or not it is correct. I'm hoping some other people familiar with ARM and DWARF can chime in. Repository: rUNW libunwind CHANGES SINCE LAST ACTION https://reviews.llvm.org/D57001/new/ https://rev

[PATCH] D28248: Work around GCC PR37804

2019-01-23 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists closed this revision. mclow.lists added a comment. I changed the `_LIBCPP_TYPE_VIS_ONLY` to `_LIBCPP_TEMPLATE_VIS` and committed this as revision 351993. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D28248/new/ https://reviews.llvm.org/D28248

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

2019-01-23 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists closed this revision. mclow.lists added a comment. Yes, this appears to have been landed. Closing. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D26110/new/ https://reviews.llvm.org/D26110 ___ cfe-commits mailing list cfe-commits

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

2019-01-23 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists closed this revision. mclow.lists added a comment. Herald added a reviewer: EricWF. For some reason, this test was not marked `// XFAIL gnu-linux` like all the other tests that use the `LOCALE_cs_CZ_ISO8859_2` locale. In revision 352006, I uncommented this entire test, and added the X

[PATCH] D14686: Protect against overloaded comma in random_shuffle and improve tests

2019-01-24 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists closed this revision. mclow.lists added a comment. Herald added a subscriber: llvm-commits. (Finally) committed this as revision 352087. I cut out most of the random_shuffle_rand.pass.cpp test, because it relied on C++11 features, and didn't work for C++03. If you want to re-submit th

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

2019-01-29 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists added a comment. Herald added a subscriber: libcxx-commits. I just tried this (on Compiler Explorer) using LLVM 7, and the code for my original test in https://bugs.llvm.org/show_bug.cgi?id=35637 is now optimal. Looking briefly at your test case, it seems to be fixed now too. Can you

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

2019-01-29 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists added a comment. In D44823#1375590 , @mclow.lists wrote: > I just tried this (on Compiler Explorer) using LLVM 7, and the code for my > original test in https://bugs.llvm.org/show_bug.cgi?id=35637 is now optimal. Pilot error - it's still the

[PATCH] D53956: Fix test assumption that Linux implies glibc.

2018-11-01 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists added a comment. I hate this chunk of code. :-( `TEST_HAS_C11_FEATURES` basically means that we can use C11 library features like `aligned_alloc`, and `timespec` etc. Repository: rCXX libc++ https://reviews.llvm.org/D53956 ___ cfe-co

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

2019-02-25 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists abandoned this revision. mclow.lists added a comment. Herald added a subscriber: jdoerfert. This appears to have been applied in a slightly different form. Certainly the functionality is there. Closing. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D37994/new/ https://review

[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-03-12 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. I see no tests here. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59253/new/ https://reviews.llvm.org/D59253 ___

[PATCH] D40181: [libcxx] Allow to set locale on Windows.

2019-03-18 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists added a comment. Herald added a project: LLVM. I have a bug report - https://bugs.llvm.org/show_bug.cgi?id=41131 - that says that we can reduce the number of calls in __libcpp_locale_guard from 10 to 2 by calling: `setlocale(LC_ALL, ...)` . Was this considered when this patch was cr

[PATCH] D60069: Declare std::tuple_element as struct instead of class

2019-04-01 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists added a comment. Did you check the places that inherit from `tuple_element`? The public/private bits change between class and struct. Repository: rCXX libc++ CHANGES SINCE LAST ACTION https://reviews.llvm.org/D60069/new/ https://reviews.llvm.org/D60069

[PATCH] D60069: Declare std::tuple_element as struct instead of class

2019-04-01 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists added a comment. In D60069#1449928 , @mclow.lists wrote: > Did you check the places that inherit from `tuple_element`? The > public/private bits change between class and struct. Never mind. I was thinking of something else; I don't think th

[PATCH] D60069: Declare std::tuple_element as struct instead of class

2019-04-01 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists added a comment. In D60069#1449937 , @jdoerrie wrote: > Right, there shouldn't be any inheritance. Some of the `public:` access > specifications are now redundant, though. And I think that you should get rid of them. Repository: rCXX lib

[PATCH] D60069: Declare std::tuple_element as struct instead of class

2019-04-01 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists accepted this revision. mclow.lists added a comment. I'm less enthusiastic about this change than the one for PR39871, because there we were being inconsistent with ourselves. However, my lack of enthusiasm is no reason not to land this. CHANGES SINCE LAST ACTION https://reviews.l

[PATCH] D49863: [istream] Fix error flags and exceptions propagated from input stream operations

2019-04-02 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists accepted this revision. mclow.lists added a comment. I'm OK with this. I think, strictly speaking, that libc++ is following the standard, and everyone else is not - but what everyone else is doing makes sense. Comment at: libcxx/include/istream:365 __input_arith

[PATCH] D60417: [libunwind] Add support for ARMv7-M architecture which uses the Thumb 2 ISA (unified syntax)

2019-04-17 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists added a comment. I have no problem with this. Repository: rUNW libunwind CHANGES SINCE LAST ACTION https://reviews.llvm.org/D60417/new/ https://reviews.llvm.org/D60417 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https:/

[PATCH] D47358: : Implement {un,}synchronized_pool_resource.

2019-04-25 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists added a comment. In D47358#1438929 , @Quuxplusone wrote: > Rebased. Added `_NOEXCEPT` to `upstream_resource()` and `options()` (this is > OK per [res.on.exception.handling]/5). That's fine, but then we should have a test for that. We have th

[PATCH] D51868: [libcxx] Build and test fixes for Windows

2018-09-18 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists added inline comments. Comment at: test/support/verbose_assert.h:24 : (IsStreamable::value ? 2 : -1))> -struct SelectStream { +struct SelectErrStream { static_assert(ST == -1, "specialization required for ST != -1"); Why the renaming here?

[PATCH] D51868: [libcxx] Build and test fixes for Windows

2018-09-19 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists added inline comments. Comment at: test/support/verbose_assert.h:26 static_assert(ST == -1, "specialization required for ST != -1"); static void Print(Tp const&) { std::clog << "Value Not Streamable!\n"; } }; > The renaming is to clarify that a

[PATCH] D50876: Clean up newly created header

2018-09-19 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists closed this revision. mclow.lists added a comment. Landed as r340049 https://reviews.llvm.org/D50876 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D50815: Establish the header

2018-09-19 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists closed this revision. mclow.lists added a comment. Landed as r339943 https://reviews.llvm.org/D50815 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D50799: Fix for PR 38495: no longer compiles on FreeBSD, due to lack of timespec_get()

2018-09-19 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists closed this revision. mclow.lists added a comment. Landed as r339816 https://reviews.llvm.org/D50799 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D50551: [libcxx] [test] Add missing to several tests.

2018-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. LFTM https://reviews.llvm.org/D50551 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/list

[PATCH] D44263: Implement LWG 2221 - No formatted output operator for nullptr

2018-09-19 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists closed this revision. mclow.lists added a comment. Landed as revision 342566 https://reviews.llvm.org/D44263 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D44263: Implement LWG 2221 - No formatted output operator for nullptr

2018-09-19 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists reopened this revision. mclow.lists added a comment. This revision is now accepted and ready to land. Reverted in r342590 while I investigate additions to the dylib. https://reviews.llvm.org/D44263 ___ cfe-commits mailing list cfe-commit

[PATCH] D44263: Implement LWG 2221 - No formatted output operator for nullptr

2018-09-19 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists added a comment. Symbol added: _ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEElsEDn {'is_defined': True, 'type': 'FUNC', 'name': '_ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEElsEDn'} Symbol added: _ZNSt3__113basic_ostreamIwNS_11char_traitsIwEEElsEDn {'is_defined': True, 'type

[PATCH] D52368: [libc++abi] is_strcmp parameter to is_equal is unused for WIN32

2018-09-21 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists added a comment. This seems like overkill to me; why not add `(void) use_strcmp` right before line 67 instead? Repository: rCXXA libc++abi https://reviews.llvm.org/D52368 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http:/

[PATCH] D52368: [libc++abi] is_strcmp parameter to is_equal is unused for WIN32

2018-09-21 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. Repository: rCXXA libc++abi https://reviews.llvm.org/D52368 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lis

[PATCH] D52401: Remove redundant null pointer check in operator delete

2018-09-30 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists added a comment. I suspect it's fine, but I need to check some stuff on old versions of glibc (I seem to recall a problem with that). Repository: rL LLVM https://reviews.llvm.org/D52401 ___ cfe-commits mailing list cfe-commits@lists.

[PATCH] D52401: Remove redundant null pointer check in operator delete

2018-09-30 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists added a comment. In https://reviews.llvm.org/D52401#1250552, @MaskRay wrote: > > I seem to recall a problem with that > > I would like to know if your impression came from the common PWN technique > when the attacker found a heap buffer overflow :) No; that's not what I'm looking i

[PATCH] D52401: Remove redundant null pointer check in operator delete

2018-10-01 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists accepted this revision. mclow.lists added a comment. Ok. I'm fine with this. Thanks for your patience. Repository: rL LLVM https://reviews.llvm.org/D52401 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/c

[PATCH] D46975: Implement deduction guides for `std::deque`

2018-10-08 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 r332785 https://reviews.llvm.org/D46975 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-

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

2018-10-08 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists added a comment. In https://reviews.llvm.org/D42242#1257428, @mgorny wrote: > @mclow.lists , ping. Any chance to get a proper version upstream? I'd rather > not pull patches from Fedora when we can have something official. I gave up on this patch several months ago, because no one

<    1   2   3   4   5   >