[PATCH] D27540: [libcxx] [test] Fix MSVC warning C4244 "conversion from 'X' to 'Y', possible loss of data", part 3/7.

2016-12-07 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF added a comment. MSVC seriously emits a warning for `void foo(short); foo(0);` because the literal `0` is an int? If so you really should fix that in MSVC; That's a bogus warning. Does it emit a warning for `short x = 3;`? https://reviews.llvm.org/D27540 _

[PATCH] D27540: [libcxx] [test] Fix MSVC warning C4244 "conversion from 'X' to 'Y', possible loss of data", part 3/7.

2016-12-07 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF added a comment. > MSVC seriously emits a warning for void foo(short); foo(0); because the > literal 0 is an int? Oh my goodness it does... Your compiler is bad and it should feel bad. It's not like you can write `foo(0s)`. https://reviews.llvm.org/D27540 ___

[PATCH] D27542: [libcxx] [test] Fix MSVC warning C4244 "conversion from 'X' to 'Y', possible loss of data", part 5/7.

2016-12-07 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF accepted this revision. EricWF added a comment. This revision is now accepted and ready to land. LGTM. https://reviews.llvm.org/D27542 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-

[PATCH] D27543: [libcxx] [test] Fix MSVC warning C4244 "conversion from 'X' to 'Y', possible loss of data", part 6/7.

2016-12-07 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF added a comment. LGTM. https://reviews.llvm.org/D27543 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D27544: [libcxx] [test] Fix MSVC warning C4244 "conversion from 'X' to 'Y', possible loss of data", part 7/7.

2016-12-07 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF accepted this revision. EricWF added a comment. This revision is now accepted and ready to land. LGTM. Comment at: test/std/re/re.traits/value.pass.cpp:119 } for (int c = 'g'; c < 0x; ++c) { Can't we just make `c` a `wchar_

[PATCH] D27541: [libcxx] [test] Fix MSVC warning C4244 "conversion from 'X' to 'Y', possible loss of data", part 4/7.

2016-12-07 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF added a comment. Waiting for a response on https://reviews.llvm.org/D27540 before reviewing this. https://reviews.llvm.org/D27541 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commi

[PATCH] D27555: [libcxx] [test] Fix MSVC warning C6001 "Using uninitialized memory".

2016-12-07 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF added a comment. Are you planning on fixing this in your compiler? https://reviews.llvm.org/D27555 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D27566: Fix PR30323: numeric_limits::max_digits10 when using 16 bit ints.

2016-12-07 Thread Eric Fiselier via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL289029: Fix PR30323: numeric_limits::max_digits10 when using 16 bit ints. (authored by EricWF). Changed prior to commit: https://reviews.llvm.org/D27566?vs=80716&id=80722#toc Repository: rL LLVM htt

[PATCH] D27540: [libcxx] [test] Fix MSVC warning C4244 "conversion from 'X' to 'Y', possible loss of data", part 3/7.

2016-12-08 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF accepted this revision. EricWF added a comment. This revision is now accepted and ready to land. Huh. Thanks for the analysis. LGTM. https://reviews.llvm.org/D27540 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org

[PATCH] D27606: [libcxx] Fix tuple construction/assignment from types derived from tuple/pair/array.

2016-12-09 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF created this revision. EricWF added reviewers: mclow.lists, K-ballo, mpark. EricWF added a subscriber: cfe-commits. The standard requires tuple have the following constructors: tuple(tuple const&); tuple(tuple &&); tuple(pair const&); tuple(pair &&); tuple(array const&); tuple(

[PATCH] D27606: [libcxx] Fix tuple construction/assignment from types derived from tuple/pair/array.

2016-12-09 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF updated this revision to Diff 80870. EricWF added a comment. Fix comments. https://reviews.llvm.org/D27606 Files: include/__tuple include/tuple include/type_traits test/std/utilities/tuple/tuple.tuple/tuple.assign/derived_from_tuple_like.pass.cpp test/std/utilities/tuple/tupl

[PATCH] D27612: [libcxx] Fix PR24075, PR23841 - Add scoped_allocator_adaptor::construct(pair*, ...) overloads.

2016-12-09 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF updated this revision to Diff 80873. EricWF added a comment. Fix copy paste errors in tests. https://reviews.llvm.org/D27612 Files: include/scoped_allocator test/std/utilities/allocator.adaptor/allocator.adaptor.members/construct_pair.pass.cpp test/std/utilities/allocator.adaptor

[PATCH] D27612: [libcxx] Fix PR24075, PR23841 - Add scoped_allocator_adaptor::construct(pair*, ...) overloads.

2016-12-09 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF created this revision. EricWF added a reviewer: mclow.lists. EricWF added subscribers: cfe-commits, Potatoswatter. For more information see: - https://llvm.org/bugs/show_bug.cgi?id=23841 - https://llvm.org/bugs/show_bug.cgi?id=24075 I hope you have as much fun reviewing as I did writing t

[PATCH] D27606: [libcxx] Fix tuple construction/assignment from types derived from tuple/pair/array.

2016-12-09 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF updated this revision to Diff 80862. EricWF added a comment. Cleanup a couple of issues. https://reviews.llvm.org/D27606 Files: include/__tuple include/tuple include/type_traits test/std/utilities/tuple/tuple.tuple/tuple.assign/derived_from_tuple_like.pass.cpp test/std/utilit

[PATCH] D27612: [libcxx] Fix PR24075, PR23841 - Add scoped_allocator_adaptor::construct(pair*, ...) overloads.

2016-12-09 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF updated this revision to Diff 80890. EricWF added a comment. - Add tests for non-pair construct function. - Fix the value-category of allocator_arg_t being used. https://reviews.llvm.org/D27612 Files: include/__functional_base include/scoped_allocator test/std/utilities/allocator.

[PATCH] D27429: [Chrono][Darwin] On Darwin use CLOCK_UPTIME_RAW instead of CLOCK_MONOTONIC

2016-12-09 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF added a comment. `CLOCK_MONOTONIC_RAW` however seems to meet the requirements.. https://reviews.llvm.org/D27429 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D27612: [libcxx] Fix PR24075, PR23841 - Add scoped_allocator_adaptor::construct(pair*, ...) overloads.

2016-12-09 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF added a reviewer: AlisdairM. EricWF added a subscriber: AlisdairM. EricWF added a comment. Adding @AlisdairM as a reviewer, because nobody knows more about allocators than Alisdair. https://reviews.llvm.org/D27612 ___ cfe-commits mailing lis

[PATCH] D24218: [libc++] Fix support for multibyte thousands_sep and decimal_point in moneypunct_byname and numpunct_byname.

2016-12-11 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF updated this revision to Diff 81010. EricWF added a comment. Address inline comments. https://reviews.llvm.org/D24218 Files: src/locale.cpp test/std/localization/locale.categories/category.monetary/locale.moneypunct.byname/decimal_point.pass.cpp test/std/localization/locale.categ

[PATCH] D27199: [libcxx] Make std::ignore constexpr

2016-12-11 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF added a comment. @AntonBikineev Do you need somebody to commit this for you? https://reviews.llvm.org/D27199 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D27429: [Chrono][Darwin] On Darwin use CLOCK_UPTIME_RAW instead of CLOCK_MONOTONIC

2016-12-11 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF added a comment. Howard Thank you for your excellent analysis. Although I still don't think that `CLOCK_UPTIME_RAW` meets the requirements of `steady_clock` but I would rather relax the standard here than provide a poor implementation. In https://reviews.llvm.org/D27429#618998, @howard.h

[PATCH] D26626: [libcxx] [test] Fix an improper assumption about Null Forward Iterators.

2016-12-11 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF accepted this revision. EricWF added a comment. This revision is now accepted and ready to land. LGTM. Go ahead and remove the tests. I filed a libc++ bug reminding me to diagnose those comparisons in debug mode (https://llvm.org/bugs/show_bug.cgi?id=31343). https://reviews.llvm.org/D26

[PATCH] D27555: [libcxx] [test] Fix MSVC warning C6001 "Using uninitialized memory".

2016-12-11 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF accepted this revision. EricWF added a comment. This revision is now accepted and ready to land. I'm happy to work around this one issue but in general I dislike initializing memory to avoid compile-time warnings. Doing so prevents the sanitizers from catching actual uninitialized memory

[PATCH] D27270: [libcxx] [test] Fix MSVC x64 warning C4267 "conversion from 'size_t' to 'int' [or 'unsigned int'], possible loss of data", part 4/4.

2016-12-11 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF requested changes to this revision. EricWF added a comment. This revision now requires changes to proceed. Actually I've changed my mind on this patch. While attempting to clean up `-Wconversion` errors in libc++ I found many of them were caused by these custom allocators providing a cust

[PATCH] D27575: [libcxxabi] Introduce an externally threaded libc++abi variant (take-2)

2016-12-11 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF added a comment. This LGTM. I'll approve after the inline comments are addressed. Comment at: CMakeLists.txt:121 option(LIBCXXABI_HAS_PTHREAD_API "Ignore auto-detection and force use of pthread API" OFF) +option(LIBCXXABI_HAS_EXTERNAL_THREAD_API + "Build libc++abi wit

[PATCH] D27270: [libcxx] [test] Fix MSVC x64 warning C4267 "conversion from 'size_t' to 'int' [or 'unsigned int'], possible loss of data", part 4/4.

2016-12-11 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF accepted this revision. EricWF added a comment. This revision is now accepted and ready to land. This change looks OK to me. As mentioned above I think the reason the test allocators used int/unsigned is so they could detect if the container actually propagated their typedefs. However the

[PATCH] D27576: [libcxx] libc++ changes necessary for the externally threaded libcxxabi variant

2016-12-11 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF added a comment. This bit LGTM. Comment at: include/__threading_support:193 +// Execute once +int __libcpp_execute_once(__libcpp_exec_once_flag *flag, + void (*init_routine)(void)) { These should have `inline`. In fact all of the

[PATCH] D26623: [libcxx] [test] Swapping non-equal non-POCS allocators is UB.

2016-12-11 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF added a comment. I hope you don't mind but I committed by own version of this change as r289358. I was concerned about testing that the container didn't actually perform a swap, so I modified test_allocator to take an "id" parameter that does not participate in equality. I then changed t

[PATCH] D26814: [libcxx] [test] Change ifstream constructor tests to handle read-only files.

2016-12-11 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF accepted this revision. EricWF added a comment. This revision is now accepted and ready to land. LGTM. Thanks for working on this. https://reviews.llvm.org/D26814 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/c

[PATCH] D27387: [libc++] Add a key function for bad_function_call

2016-12-11 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF requested changes to this revision. EricWF added a comment. This revision now requires changes to proceed. OK. I would like to see this change introduced under a `_LIBCPP_ABI` flag. I'll take a look at this again after that. https://reviews.llvm.org/D27387

[PATCH] D26896: [libcxx] Make constexpr char_traits and char_traits

2016-12-11 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF requested changes to this revision. EricWF added a comment. This revision now requires changes to proceed. Marking as "Changes requested". I'll take a look at this again once the if-def hell around `find` and `compare` are cleaned up. https://reviews.llvm.org/D26896 _

[PATCH] D27658: [libcxx] Fix all occurrences of -Wsign-compare in the headers

2016-12-11 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF created this revision. EricWF added a reviewer: mclow.lists. EricWF added subscribers: cfe-commits, STL_MSFT. The title says it all. Thanks to STL for cleaning up all occurrences in the tests so we can find these. https://reviews.llvm.org/D27658 Files: include/__bit_reference includ

[PATCH] D26830: [libcxx] Add string_view literals

2016-12-11 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF added a comment. Please ping this once the Clang changes have been accepted. I'm just waiting on those to give this the final OK. https://reviews.llvm.org/D26830 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/c

[PATCH] D32265: Add __CLANG_ATOMIC__LOCK_FREE macros for use in MSVC compatibility mode.

2017-04-19 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF created this revision. Herald added subscribers: dschuff, jfb. Libc++ currently implements the `ATOMIC__LOCK_FREE` macros using the `__GCC_ATOMIC__LOCK_FREE` macros. However these are not available when MSVC compatibility is enabled even though C11 `_Atomic` is. This prevents libc++ fro

[PATCH] D32265: Add __CLANG_ATOMIC__LOCK_FREE macros for use in MSVC compatibility mode.

2017-04-20 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF added a comment. In https://reviews.llvm.org/D32265#731709, @jfb wrote: > Is it a goal to support Microsoft's STL with this? If so, how does MSVC's STL > implement `is_always_lock_free` at the moment? CL 19 2017 RTW doesn't seem to > have anything ? Presumab

[PATCH] D32265: Add __CLANG_ATOMIC__LOCK_FREE macros for use in MSVC compatibility mode.

2017-04-20 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF added a comment. In https://reviews.llvm.org/D32265#732649, @jfb wrote: > In https://reviews.llvm.org/D32265#731710, @EricWF wrote: > > > In https://reviews.llvm.org/D32265#731709, @jfb wrote: > > > > > Is it a goal to support Microsoft's STL with this? If so, how does MSVC's > > > STL im

[PATCH] D30773: Make git-clang-format python 3 compatible

2017-04-20 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF updated this revision to Diff 96025. EricWF added a comment. I've committed all but the `str` vs `byte` changes upstream. https://reviews.llvm.org/D30773 Files: tools/clang-format/git-clang-format Index: tools/clang-format/git-clang-format

[PATCH] D32265: Add __CLANG_ATOMIC__LOCK_FREE macros for use in MSVC compatibility mode.

2017-04-20 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF updated this revision to Diff 96043. EricWF added a comment. - Address inline comments. https://reviews.llvm.org/D32265 Files: lib/Frontend/InitPreprocessor.cpp test/Preprocessor/init.c test/Sema/atomic-ops.c Index: test/Sema/atomic-ops.c ==

[PATCH] D32322: Use __CLANG_ATOMIC_TYPE_LOCK_FREE macros in `stdatomic.h`

2017-04-20 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF created this revision. This patch makes the header `stdatomic.h` work when `-fms-compatibility` is specified. https://reviews.llvm.org/D32322 Files: lib/Headers/stdatomic.h test/Headers/stdatomic.c Index: test/Headers/stdatomic.c ===

[PATCH] D32320: [libc++] Default to vcruntime when targeting MSVC

2017-04-20 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF accepted this revision. EricWF added a comment. This revision is now accepted and ready to land. LGTM. Comment at: CMakeLists.txt:119 +set(LIBCXX_CXX_ABI_LIBNAME "vcruntime") else() +find_path( Nit: I would rather see this be ``` elseif ((NOT

[PATCH] D32147: [PR32479] Avoid newlib vasprintf, since it requires gnu extensions

2017-04-20 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF resigned from this revision. EricWF added a comment. The bug relating to this patch was closed as WONTFIX. This review should be closed. https://reviews.llvm.org/D32147 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.ll

[PATCH] D32111: [modules] Attempt to fix PR31905 - #include "stddef.h" breaks module map search paths; causes redefinitions.

2017-04-20 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF planned changes to this revision. EricWF added a comment. I've got a better, actually correct, solution incoming. https://reviews.llvm.org/D32111 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/li

[PATCH] D32824: [libc++] Use placeholder return types to avoid hard errors during overload resolution

2017-05-03 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF added a comment. Please add a test for this. https://reviews.llvm.org/D32824 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D32726: [libcxx] [test] In msvc_stdlib_force_include.hpp, use _HAS_CXX17 to set TEST_STD_VER.

2017-05-03 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF accepted this revision. EricWF added a comment. This revision is now accepted and ready to land. LGTM after addressing inline comments. Comment at: test/support/msvc_stdlib_force_include.hpp:76 +#include + Is the `stdlib.h` include above not enough?

[PATCH] D32726: [libcxx] [test] In msvc_stdlib_force_include.hpp, use _HAS_CXX17 to set TEST_STD_VER.

2017-05-03 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF added a comment. Also you're free to commit to MSVC specific files without pre-commit review :-) https://reviews.llvm.org/D32726 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commit

[PATCH] D32824: [libc++] Use placeholder return types to avoid hard errors during overload resolution

2017-05-03 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF requested changes to this revision. EricWF added a comment. This revision now requires changes to proceed. This change regresses other code. By changing `__bind_return<...>::type` into `decltype(auto)` you prevent the member functions from SFINAE'ing. For example: #include struct

[PATCH] D32838: [libcxx] Make __shared_weak_count VTable consistent across all build configurations

2017-05-03 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF created this revision. This patch ensures that `__shared_weak_count` provides a consistent vtable regardless of if RTTI is enabled or if we are targeting a static or shared libc++ build. This patch is technically ABI breaking, but only for a very specific configuration that neither Appl

[PATCH] D32836: CMake: Only add test/ subdirectory when it exists

2017-05-03 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF accepted this revision. EricWF added a comment. This revision is now accepted and ready to land. I'm OK with this patch because it's minimally invasive. However it seems strange to support arbitrary configurations that delete random parts of the source tree. https://reviews.llvm.org/D32

[PATCH] D32838: [libcxx] Make __shared_weak_count VTable consistent across all build configurations

2017-05-03 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF added inline comments. Comment at: src/memory.cpp:126-130 const void* __shared_weak_count::__get_deleter(const type_info&) const _NOEXCEPT { -return 0; +return nullptr; } dexonsmith wrote: > If this is the right change, seems like the 0/nullptr

[PATCH] D32727: [libcxx] [test] Be compatible with LWG 2438 "std::iterator inheritance shouldn't be mandated".

2017-05-04 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF accepted this revision. EricWF added inline comments. This revision is now accepted and ready to land. Comment at: test/std/iterators/stream.iterators/istream.iterator/types.pass.cpp:42 #include int main() Needs `#include "test_macros.h"` =

[PATCH] D32727: [libcxx] [test] Be compatible with LWG 2438 "std::iterator inheritance shouldn't be mandated".

2017-05-04 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF added a comment. LGTM minus inline comments. https://reviews.llvm.org/D32727 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D32574: [libcxx] [test] Fixed possible loss of data warnings in tests on amd64

2017-05-04 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF accepted this revision. EricWF added a comment. This revision is now accepted and ready to land. LGTM after addressing inline comments. Comment at: test/std/strings/basic.string/string.cons/T_size_size.pass.cpp:39 assert(pos <= sv.size()); -unsigned rlen

[PATCH] D32671: [libcxx] [test] variant: test coverage for P0602 extension

2017-05-04 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF added a comment. Could you commit all the changes *except* the trivial extensions tests, and then update this to contain only that? https://reviews.llvm.org/D32671 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org

[PATCH] D32510: [libcxx] Fix C1XX implementation of DoNotOptimize

2017-05-04 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF accepted this revision. EricWF added a comment. This revision is now accepted and ready to land. Oops. Thanks for the fix. https://reviews.llvm.org/D32510 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/m

[PATCH] D32386: [libcxx] [test] Avoid P0138R2, direct-list-init of fixed enums from integers.

2017-05-04 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF accepted this revision. EricWF added a comment. This revision is now accepted and ready to land. Could you add a separate test that performs direct-list-init of fixed enums from integers, and XFAIL it accordingly? Testing it found a bug, so I don't want to complete eliminate that test co

[PATCH] D32309: [libcxx] [test] Resolve compiler warnings in LCM/GCD tests

2017-05-04 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF added inline comments. Comment at: test/std/numerics/numeric.ops/numeric.ops.gcd/gcd.pass.cpp:146 +auto res = std::gcd(static_cast(1234), INT32_MIN); +static_assert(std::is_same>::value, ""); assert(res == 2); `std::common_type` he

[PATCH] D32385: [libcxx] optional: Implement LWG 2900 and P0602

2017-05-04 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF added a comment. So Itanium ABI has this quirk where trivial types are passed using different conventions than non-trivial types. This means changing the triviality of `std::optional` for any instantiation is potentially ABI breaking. I'll need to do more investigation to find out how th

[PATCH] D32574: [libcxx] [test] Fixed possible loss of data warnings in tests on amd64

2017-05-04 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF added inline comments. Comment at: test/std/strings/basic.string/string.cons/T_size_size.pass.cpp:39 assert(pos <= sv.size()); -unsigned rlen = std::min(sv.size() - pos, n); +unsigned rlen = std::min(static_cast(sv.size()) - pos, n); asser

[PATCH] D32385: [libcxx] optional: Implement LWG 2900 and P0602

2017-05-04 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF added a comment. > libc++ committed to ABI stability for optional, a new feature of C++17, > before the standard shipped? Libc++ doesn't commit to anything, the vendors such as Apple and FreeBSD do. I don't think either of them have shipped a release with std::optional yet, but I need to

[PATCH] D32927: [libc++] Implement exception_ptr on Windows

2017-05-05 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF created this revision. Herald added a subscriber: mgorny. This patch implements exception_ptr on Windows using the `__ExceptionPtrFoo` functions provided by MSVC. The `__ExceptionPtrFoo` functions are defined inside the C++ standard library, `msvcprt`, which is unfortunate because it req

[PATCH] D32926: [libcxx] [test] Suppress MSVC's /analyze warning C6294 in a more fine-grained manner.

2017-05-05 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF accepted this revision. EricWF added a comment. This revision is now accepted and ready to land. Gotta love warnings caused by weird bitset instantiations. https://reviews.llvm.org/D32926 ___ cfe-commits mailing list cfe-commits@lists.llvm.or

[PATCH] D32927: [libc++] Implement exception_ptr on Windows

2017-05-05 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF added inline comments. Comment at: include/exception:192 +#endif +void* __ptr1_; +void* __ptr2_; STL_MSFT wrote: > BillyONeal wrote: > > I hope you realize you are doing "evil" unsupported things :). (We won't go > > out of our way to break this,

[PATCH] D32927: [libc++] Implement exception_ptr on Windows

2017-05-05 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF added a comment. I think the medium to long term goal should be to replace the `__ExceptionPtrFoo` functions we use with our own implementation, so we no longer rely on these MSVC implementation details. However it appears that we don't have access to the internal headers that we might

[PATCH] D32927: [libc++] Implement exception_ptr on Windows

2017-05-06 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF added inline comments. Comment at: test/std/language.support/support.exception/propagation/current_exception.pass.cpp:10-11 -// exception_ptr has not been implemented on Windows +// This test needs to be rewritten for the Windows exception_ptr semantics +// which copy t

[PATCH] D32948: [C++1z] Add speculative SD-6 feature test macro for pack expansions in using declarations

2017-05-06 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF created this revision. This patch adds the `__cpp_variadic_using` feature test macro suggested in P0195r2. Note that this macro is not yet listed by SD-6. https://reviews.llvm.org/D32948 Files: lib/Frontend/InitPreprocessor.cpp test/Lexer/cxx-features.cpp Index: test/Lexer/cxx-fea

[PATCH] D32949: [Lexer] Make __has_extension ignore -pedantic-errors inside system headers

2017-05-06 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF created this revision. Libc++ needs to be able to detect and use certain language extensions inside the STL headers. However `__has_extension` currently return `0` when `-pedantic-errors` is specified. However libc++ can still safely use these extensions since `-pedantic-errors` is ignor

[PATCH] D32950: Support C++1z features in `__has_extension`

2017-05-06 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF created this revision. This patch updates `__has_extension` to report the C++1z extensions Clang offers https://reviews.llvm.org/D32950 Files: docs/LanguageExtensions.rst lib/Lex/PPMacroExpansion.cpp test/Lexer/has_extension_cxx.cpp test/Lexer/has_feature_cxx0x.cpp test/SemaCXX

[PATCH] D32950: Support C++1z features in `__has_extension`

2017-05-06 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF updated this revision to Diff 98087. EricWF added a comment. - Improve documentation https://reviews.llvm.org/D32950 Files: docs/LanguageExtensions.rst lib/Lex/PPMacroExpansion.cpp test/Lexer/has_extension_cxx.cpp test/Lexer/has_feature_cxx0x.cpp test/SemaCXX/cxx1z-extensions.c

[PATCH] D32950: Support C++1z features in `__has_extension`

2017-05-06 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF updated this revision to Diff 98088. EricWF added a comment. - Correctly report that structured bindings, inline variables, and fold expressions are available in C++03. https://reviews.llvm.org/D32950 Files: docs/LanguageExtensions.rst lib/Lex/PPMacroExpansion.cpp test/Lexer/has_e

[PATCH] D32927: [libc++] Implement exception_ptr on Windows

2017-05-07 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF added a comment. In https://reviews.llvm.org/D32927#748119, @bcraig wrote: > libstdc++ and the Visual Studio C++ runtime have very different compatibility > expectations. I only meant to imply that linking to another standard library implementation hasn't caused major issues in the pas

[PATCH] D32927: [libc++] Implement exception_ptr on Windows

2017-05-07 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF updated this revision to Diff 98119. EricWF added a comment. - Remove some missed XFAILS https://reviews.llvm.org/D32927 Files: include/exception lib/CMakeLists.txt src/exception.cpp src/support/runtime/exception_pointer_msvc.ipp test/libcxx/thread/futures/futures.promise/set_e

[PATCH] D32927: [libc++] Implement exception_ptr on Windows

2017-05-07 Thread Eric Fiselier via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL302393: [libc++] Implement exception_ptr on Windows (authored by EricWF). Changed prior to commit: https://reviews.llvm.org/D32927?vs=98119&id=98120#toc Repository: rL LLVM https://reviews.llvm.org/

[PATCH] D32329: [libc++abi] Disable libc++ extern templates project-wide

2017-05-07 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF added a comment. The reason I've been punting on this is that I want to set up ABI list checks for libc++abi just like we do for libc++. @smeenai If you can verify that this change doesn't affect the libc++abi export lists on OS X and Linux then it LGTM, but I want that to be confirmed b

[PATCH] D32309: [libcxx] [test] Resolve compiler warnings in LCM/GCD tests

2017-05-08 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF accepted this revision. EricWF added a comment. This revision is now accepted and ready to land. LGTM, preferably with the suggested cleanups. Comment at: test/std/numerics/numeric.ops/numeric.ops.gcd/gcd.pass.cpp:146 +auto res = std::gcd(static_cast(1234), INT32

[PATCH] D32574: [libcxx] [test] Fixed possible loss of data warnings in tests on amd64

2017-05-08 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF accepted this revision. EricWF added a comment. Still LGTM. https://reviews.llvm.org/D32574 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D32309: [libcxx] [test] Resolve compiler warnings in LCM/GCD tests

2017-05-08 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF added inline comments. Comment at: test/std/numerics/numeric.ops/numeric.ops.gcd/gcd.pass.cpp:42 +constexpr bool test0(int in1, int in2, int out) { +static_assert(std::is_same EricWF wrote: > > Nit but this seems much cleaner and more readable without the casts. > >

[PATCH] D32984: [Sema] Implement Core 2094: Trivial copy/move constructor for class with volatile member

2017-05-08 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF created this revision. This patch implements http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_defects.html#2094 which reverts Core 496. https://reviews.llvm.org/D32984 Files: lib/AST/Type.cpp test/CXX/drs/dr20xx.cpp test/CXX/drs/dr4xx.cpp test/SemaCXX/type-traits.cpp Index: te

[PATCH] D32984: [Sema] Implement Core 2094: Trivial copy/move constructor for class with volatile member

2017-05-08 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF updated this revision to Diff 98229. EricWF added a comment. - Use `sup` instead of `reverted by` to match style of other DRs. https://reviews.llvm.org/D32984 Files: lib/AST/Type.cpp test/CXX/drs/dr20xx.cpp test/CXX/drs/dr4xx.cpp test/SemaCXX/type-traits.cpp Index: test/SemaCXX

[PATCH] D32984: [Sema] Implement Core 2094: Trivial copy/move constructor for class with volatile member

2017-05-08 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF updated this revision to Diff 98234. EricWF marked 2 inline comments as done. EricWF added a comment. - Fix incorrect issue number. - Regenerate issue list. https://reviews.llvm.org/D32984 Files: lib/AST/Type.cpp test/CXX/drs/dr20xx.cpp test/CXX/drs/dr4xx.cpp test/SemaCXX/type-tr

[PATCH] D32988: [libc++] Refactor Windows support headers.

2017-05-08 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF created this revision. This patch refactors and tries to remove as much of the Windows support headers as possible. This is needed because they currently introduce super weird include cycles and dependencies between STL and libc headers. The changes in this patch are: - remove `support/

[PATCH] D32988: [libc++] Refactor Windows support headers.

2017-05-08 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF updated this revision to Diff 98246. EricWF added a comment. - Rename `msvc_support.h` to `msvc_builtin_support.h`. https://reviews.llvm.org/D32988 Files: include/__config include/algorithm include/ctype.h include/limits include/stdio.h include/stdlib.h include/support/win3

[PATCH] D32988: [libc++] Refactor Windows support headers.

2017-05-08 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF planned changes to this revision. EricWF added a comment. This breaks MinGW. I'll update soon. Comment at: include/algorithm:647 #endif -#if defined(_LIBCPP_MSVCRT) || defined(__MINGW32__) -#include "support/win32/support.h" +#if defined(_LIBCPP_COMPILER_MSVC) +#include

[PATCH] D32984: [Sema] Implement Core 2094: Trivial copy/move constructor for class with volatile member

2017-05-09 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF updated this revision to Diff 98359. EricWF added a comment. - Remove unrelated issues list changes. https://reviews.llvm.org/D32984 Files: lib/AST/Type.cpp test/CXX/drs/dr20xx.cpp test/CXX/drs/dr4xx.cpp test/SemaCXX/type-traits.cpp www/cxx_dr_status.html Index: www/cxx_dr_sta

[PATCH] D32988: [libc++] Refactor Windows support headers.

2017-05-09 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF added inline comments. Comment at: include/__config:232-235 +#ifndef NOMINMAX +#define NOMINMAX +#endif + compnerd wrote: > bcraig wrote: > > I can see this helping when we are build libc++, but I don't think it helps > > client apps. They could have inc

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

2017-05-10 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF created this revision. This patch fixes bugs.llvm.org/PR32979. [util.smartptr.shared.const] says: > In the constructor definitions below, enables shared_from_this with p, for a > pointer p of type Y*, means > that if Y has an unambiguous and accessible base class that is a > specializa

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

2017-05-10 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF accepted this revision. EricWF added a comment. This revision is now accepted and ready to land. LGTM. The bots are already failing because I upgraded their compilers. @BillyONeal Can you commit this soon so I can clean up any fallout? https://reviews.llvm.org/D33021 _

[PATCH] D32988: [libc++] Refactor Windows support headers.

2017-05-10 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF updated this revision to Diff 98528. EricWF added a comment. - General cleanup changes. Libc++ trunk currently doesn't build under MinGW, so I'm not concerned about breaking that worse with this patch. I've set up a Appveyor builder to track MinGW so we can get it green later. Also I'm

[PATCH] D32988: [libc++] Refactor Windows support headers.

2017-05-10 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF accepted this revision. EricWF added a comment. @compnerd I'm going to go ahead and land this and then submit a separate review for the changes you've requested. I hope you don't mind :-) https://reviews.llvm.org/D32988 ___ cfe-commits maili

[PATCH] D32988: [libc++] Refactor Windows support headers.

2017-05-10 Thread Eric Fiselier via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL302727: [libc++] Refactor Windows support headers. (authored by EricWF). Changed prior to commit: https://reviews.llvm.org/D32988?vs=98528&id=98530#toc Repository: rL LLVM https://reviews.llvm.org/D

[PATCH] D33080: [Libc++] Use #pragma push_macro/pop_macro to better handle min/max on Windows

2017-05-10 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF created this revision. Herald added a subscriber: krytarowski. This patch improves how libc++ handles min/max macros within the headers. Previously libc++ would undef them and emit a warning. This patch changes libc++ to use `#pragma push_macro` to save the macro before undefining it, an

[PATCH] D33080: [Libc++] Use #pragma push_macro/pop_macro to better handle min/max on Windows

2017-05-10 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF updated this revision to Diff 98561. EricWF added a comment. - Remove failing test. This patch cannot be easily tested because the system's libc might also mess with the definitions of `min` and `max`. https://reviews.llvm.org/D33080 Files: include/__bit_reference include/__config

[PATCH] D33080: [Libc++] Use #pragma push_macro/pop_macro to better handle min/max on Windows

2017-05-10 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF updated this revision to Diff 98562. EricWF added a comment. - Fix unterminated preprocessor directive. https://reviews.llvm.org/D33080 Files: include/__bit_reference include/__config include/__hash_table include/__mutex_base include/__split_buffer include/__std_stream incl

[PATCH] D33082: Fix Libc++ build with MinGW64

2017-05-10 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF created this revision. This patch corrects the build errors I encountered when building on MinGW64. https://reviews.llvm.org/D33082 Files: include/__locale include/locale include/stdio.h include/support/win32/locale_win32.h include/wchar.h src/new.cpp src/support/win32/loca

[PATCH] D33080: [Libc++] Use #pragma push_macro/pop_macro to better handle min/max on Windows

2017-05-11 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF added inline comments. Comment at: include/__threading_support:632 #endif // _LIBCPP_HAS_THREAD_API_PTHREAD #endif // !_LIBCPP_HAS_THREAD_LIBRARY_EXTERNAL || _LIBCPP_BUILDING_THREAD_LIBRARY_EXTERNAL Missing _LIBCPP_POP_MACROS https://reviews.llvm.or

[PATCH] D33080: [Libc++] Use #pragma push_macro/pop_macro to better handle min/max on Windows

2017-05-11 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF added a comment. In https://reviews.llvm.org/D33080#752202, @bcraig wrote: > I like the warning that you generate for min and max macros existing. Only on warn on platforms where we don't have `#pragma push_macro/pop_macro`. > Is the push_macro / pop_macro the right way to go though? Y

[PATCH] D33080: [Libc++] Use #pragma push_macro/pop_macro to better handle min/max on Windows

2017-05-11 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF updated this revision to Diff 98725. EricWF added a comment. - Fix missing `_LIBCPP_POP_MACROS` in `<__threading_support>`. - Add test that each header is unaffected by `min` and `max` macros and that the macros themselves are unaffected. https://reviews.llvm.org/D33080 Files: include

<    6   7   8   9   10   11