[PATCH] D32515: [libcxx] [test] Changes to accommodate LWG 2904 "Make variant move-assignment more exception safe"

2017-04-28 Thread Casey Carter via Phabricator via cfe-commits
CaseyCarter added a comment. Added some inline notes for reviewers. Comment at: test/std/utilities/variant/variant.variant/variant.assign/T.pass.cpp:195 } -assert(v.valueless_by_exception()); +assert(v.index() == 0); +assert(std::get<0>(v) == "hello");

[PATCH] D32515: [libcxx] [test] Changes to accommodate LWG 2904 "Make variant move-assignment more exception safe"

2017-04-25 Thread Casey Carter via Phabricator via cfe-commits
CaseyCarter created this revision. NOTE: TEST CHANGES ONLY. These tests will not pass with the current implementation of `variant`, but should give the implementor of LWG2904 a head start. Details: test/std/utilities/variant/variant.variant/variant.assign/copy.pass.cpp: - Make `CopyAssign`'s

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

2017-04-25 Thread Casey Carter via Phabricator via cfe-commits
CaseyCarter created this revision. ...in test_macros.h https://reviews.llvm.org/D32510 Files: test/support/test_macros.h Index: test/support/test_macros.h === --- test/support/test_macros.h +++ test/support/test_macros.h @@

[PATCH] D32385: [libcxx] Implement LWG 2900 "The copy and move constructors of optional are not constexpr"

2017-04-25 Thread Casey Carter via Phabricator via cfe-commits
CaseyCarter updated this revision to Diff 96644. CaseyCarter added a comment. Assigning an empty optional to a non-empty optional needs to destroy the contained value, so we need to also require `is_trivially_destructible` to implement trivial assignments. https://reviews.llvm.org/D32385

[PATCH] D32385: [libcxx] Implement LWG 2900 "The copy and move constructors of optional are not constexpr"

2017-04-21 Thread Casey Carter via Phabricator via cfe-commits
CaseyCarter created this revision. .. by injecting base classes that differentiate between trivial/non-trivial implementation of each copy/move constructor/assignment. This actually goes a bit beyond the PR by also making the copy/move assignment operators trivial when the base type has

[PATCH] D32106: [libcxx][test] Expand LWG2857 coverage

2017-04-21 Thread Casey Carter via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL301055: Expand test coverage for LWG2857 (authored by CaseyCarter). Changed prior to commit: https://reviews.llvm.org/D32106?vs=95368=96260#toc Repository: rL LLVM https://reviews.llvm.org/D32106

[PATCH] D32107: [libc++][test] LWG2857 test coverage for variant

2017-04-14 Thread Casey Carter via Phabricator via cfe-commits
CaseyCarter added a comment. In https://reviews.llvm.org/D32107#727751, @EricWF wrote: > Give me a day to implement this in variant and then this should be ready to > land. No rush; the patch isn't going anywhere ;) https://reviews.llvm.org/D32107

[PATCH] D32107: [libc++][test] LWG2857 test coverage for variant

2017-04-14 Thread Casey Carter via Phabricator via cfe-commits
CaseyCarter created this revision. As the saying goes, "works on my machine." NOTE: libc++ variant does not yet implement LWG2857 and will not pass these tests; MSVC variant does. Changes under `TEST_VARIANT_HAS_NO_REFERENCES` are dry-coded; I figure that's better than nothing.

[PATCH] D32106: [libcxx][test] Expand LWG2857 coverage

2017-04-14 Thread Casey Carter via Phabricator via cfe-commits
CaseyCarter created this revision. - Cover `optional`'s emplace-from-`initializer_list` overload - Verify that `any::emplace` and `optional::emplace` return a reference to the correct type even for throwing cases https://reviews.llvm.org/D32106 Files:

[PATCH] D31260: [libc++] Work around C1XX bug which breaks poisoned hash tests.

2017-03-22 Thread Casey Carter via Phabricator via cfe-commits
CaseyCarter added a comment. I also have no problem with this change. Comment at: test/support/poisoned_hash_helper.hpp:53 using LibraryHashTypes = TypeList< +#if !defined(TEST_WORKAROUND_C1XX_BROKEN_NULLPTR_CONVERSION_OPERATOR) #if TEST_STD_VER > 14 I would

[PATCH] D27436: [libcxx] [test] std::get<0>([std::variant constant expression]) *is* noexcept

2016-12-05 Thread Casey Carter via Phabricator via cfe-commits
CaseyCarter updated this revision to Diff 80365. CaseyCarter added a comment. Address review comments: - Annotate the clang bug which the conditional compilation is avoiding. - Assure the expression in question is not noexcept when not a constant expression. - Cover get_type

[PATCH] D27436: [libcxx] [test] std::get<0>([std::variant constant expression]) *is* noexcept

2016-12-05 Thread Casey Carter via Phabricator via cfe-commits
CaseyCarter added inline comments. Comment at: test/std/utilities/variant/variant.get/get_index.pass.cpp:39 constexpr V v(42); -ASSERT_NOT_NOEXCEPT(std::get<0>(v)); +#ifndef __clang__ +ASSERT_NOEXCEPT(std::get<0>(v)); THAT'S RIGHT, A CLANG BUG

[PATCH] D27436: [libcxx] [test] std::get<0>([std::variant constant expression]) *is* noexcept

2016-12-05 Thread Casey Carter via Phabricator via cfe-commits
CaseyCarter created this revision. CaseyCarter added reviewers: EricWF, mclow.lists. CaseyCarter added a subscriber: cfe-commits. noexcept(foo) is true when foo is a constant expression. https://reviews.llvm.org/D27436 Files: test/std/utilities/variant/variant.get/get_index.pass.cpp Index:

<    1   2