Re: [PATCH] D20922: [libcxx] [test] Rename global "x" to "testcases" in complex.number/cases.h and make it const for safety.

2016-06-07 Thread Stephan T. Lavavej via cfe-commits
STL_MSFT closed this revision. STL_MSFT added a comment. Marshall checked this in, so I'm closing this. http://reviews.llvm.org/D20922 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

Re: [PATCH] D20921: [libcxx] [test] Slightly rearrange scopes in order to avoid shadowing M typedefs.

2016-06-07 Thread Stephan T. Lavavej via cfe-commits
STL_MSFT closed this revision. STL_MSFT added a comment. Marshall checked this one in too, closing. http://reviews.llvm.org/D20921 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D21093: [libcxx] [test] In unord.hash/floating.pass.cpp, add a static_cast to fix a truncation warning.

2016-06-07 Thread Stephan T. Lavavej via cfe-commits
STL_MSFT created this revision. STL_MSFT added reviewers: mclow.lists, EricWF. STL_MSFT added a subscriber: cfe-commits. In unord.hash/floating.pass.cpp, add a static_cast to fix a truncation warning. Fixes MSVC warning C4305 "'argument': truncation from 'double' to 'const std::hash::_Kty'".

[PATCH] D21094: [libcxx] [test] In test/support/test_allocator.h, fix construct() to avoid moving immovable types.

2016-06-07 Thread Stephan T. Lavavej via cfe-commits
STL_MSFT created this revision. STL_MSFT added reviewers: mclow.lists, EricWF. STL_MSFT added a subscriber: cfe-commits. In test/support/test_allocator.h, fix construct() to avoid moving immovable types. This improves the allocator's conformance, and fixes compiler errors with MSVC's STL. The

[PATCH] D21095: [libcxx] [test] Fix another MSVC warning C4101 "unreferenced local variable".

2016-06-07 Thread Stephan T. Lavavej via cfe-commits
STL_MSFT created this revision. STL_MSFT added reviewers: mclow.lists, EricWF. STL_MSFT added a subscriber: cfe-commits. Fix another MSVC warning C4101 "unreferenced local variable". http://reviews.llvm.org/D21095 Files:

[PATCH] D21092: [libcxx] [test] Fix vector tests that were using ints copy-pasted from vector tests.

2016-06-07 Thread Stephan T. Lavavej via cfe-commits
STL_MSFT created this revision. STL_MSFT added reviewers: mclow.lists, EricWF. STL_MSFT added a subscriber: cfe-commits. Fix vector tests that were using ints copy-pasted from vector tests. I copied the bool a[] 0/1 pattern from another vector test. Fixes MSVC warning C4305 "'argument':

[PATCH] D21096: [libcxx] [test] Fix MSVC warning C4125 "decimal digit terminates octal escape sequence".

2016-06-07 Thread Stephan T. Lavavej via cfe-commits
STL_MSFT created this revision. STL_MSFT added reviewers: mclow.lists, EricWF. STL_MSFT added a subscriber: cfe-commits. Fix MSVC warning C4125 "decimal digit terminates octal escape sequence". MSVC somewhat justifiably warns when it sees an octal escape immediately followed by a decimal digit,

RE: [PATCH] D20328: [libcxx] Externally threaded libc++ variant

2016-06-07 Thread Stephan T. Lavavej via cfe-commits
[Asiri Rathnayake] > The `constexpr` mutex constructor is apparently also a > pain point on windows [1], I'm sure @STL_MSFT knows more about it. That's because of MSVC-specific issues, where we need to dynamically switch between WinAPI and ConcRT implementations depending on whether the end

RE: [PATCH] D21098: [libcxx] [test] Replace __cplusplus comparisons with TEST_STD_VER and __has_feature with TEST_HAS_FEATURE.

2016-06-14 Thread Stephan T. Lavavej via cfe-commits
[Eric Fiselier] > Please change the `TEST_HAS_FEATURE(XXX)` into `TEST_STD_VER >= 11` for the > following C++11 features: > - `cxx_noexcept` > - `cxx_atomic` > - `cxx_access_control_sfinae` > Also if the entire test is wrapped in a `TEST_HAS_FEATURE(XXX)` please > translate that into a `//

Re: [PATCH] D21320: Alternative to D1332

2016-06-14 Thread Stephan T. Lavavej via cfe-commits
STL_MSFT resigned from this revision. STL_MSFT removed a reviewer: STL_MSFT. STL_MSFT added a comment. My only concern is that the tests in test/std shouldn't exercise this bug in the standard, as MSVC's implementation doesn't special-case it. If you'd like to special-case it in your product

Re: [PATCH] D21094: [libcxx] [test] In test/support/test_allocator.h, fix construct() to avoid moving immovable types.

2016-06-14 Thread Stephan T. Lavavej via cfe-commits
STL_MSFT updated this revision to Diff 60736. STL_MSFT added a comment. Inspect TEST_STD_VER and cast to void* as requested. I used a static_cast to avoid triggering any old-style cast warnings. (I also just noticed that I deleted an empty line, but was too lazy to regenerate the diff. Oops.)

[PATCH] D20918: [libcxx] [test] Silence more "unreferenced local variable" warnings.

2016-06-02 Thread Stephan T. Lavavej via cfe-commits
STL_MSFT created this revision. STL_MSFT added reviewers: EricWF, mclow.lists. STL_MSFT added a subscriber: cfe-commits. Silence more "unreferenced local variable" warnings. http://reviews.llvm.org/D20918 Files: test/std/depr/depr.c.headers/wchar_h.pass.cpp Index:

[PATCH] D20922: [libcxx] [test] Rename global "x" to "testcases" in complex.number/cases.h and make it const for safety.

2016-06-02 Thread Stephan T. Lavavej via cfe-commits
STL_MSFT created this revision. STL_MSFT added reviewers: EricWF, mclow.lists. STL_MSFT added a subscriber: cfe-commits. Rename global "x" to "testcases" in complex.number/cases.h and make it const for safety. Fixes MSVC warning C4459 "declaration of 'x' hides global declaration". NOTE: As the

[PATCH] D20919: [libcxx] [test] Rename b to b2 in order to avoid shadowing between nested catch blocks.

2016-06-02 Thread Stephan T. Lavavej via cfe-commits
STL_MSFT created this revision. STL_MSFT added reviewers: EricWF, mclow.lists. STL_MSFT added a subscriber: cfe-commits. Rename b to b2 in order to avoid shadowing between nested catch blocks. Fixes MSVC warning C6246 "Local declaration of 'b' hides declaration of the same name in outer scope."

[PATCH] D20920: [libcxx] [test] Rename d to dbl in order to avoid shadowing distributions named d.

2016-06-02 Thread Stephan T. Lavavej via cfe-commits
STL_MSFT created this revision. STL_MSFT added reviewers: EricWF, mclow.lists. STL_MSFT added a subscriber: cfe-commits. Rename d to dbl in order to avoid shadowing distributions named d. This was almost always declared as double d, except in rand.dist.uni.real where it was D::result_type d

[PATCH] D21346: [libcxx] [test] Improve portability of random_device tests.

2016-06-14 Thread Stephan T. Lavavej via cfe-commits
STL_MSFT created this revision. STL_MSFT added reviewers: EricWF, mclow.lists. STL_MSFT added a subscriber: cfe-commits. Improve portability of random_device tests. These tests were failing for MSVC, because we ignore the token (as permitted by the Standard). Marking the asserts as

[PATCH] D21347: [libcxx] [test] Improve portability of hash tests.

2016-06-14 Thread Stephan T. Lavavej via cfe-commits
STL_MSFT created this revision. STL_MSFT added reviewers: EricWF, mclow.lists. STL_MSFT added a subscriber: cfe-commits. Improve portability of hash tests. These tests were expecting libcxx's identity-hash behavior, which isn't guaranteed by the Standard and isn't provided by MSVC (we currently

[PATCH] D21349: [libcxx] [test] Fix a typo in commented-out code.

2016-06-14 Thread Stephan T. Lavavej via cfe-commits
STL_MSFT created this revision. STL_MSFT added reviewers: EricWF, mclow.lists. STL_MSFT added a subscriber: cfe-commits. Fix a typo in commented-out code. http://reviews.llvm.org/D21349 Files: test/std/utilities/meta/meta.unary/meta.unary.prop/is_constructible.pass.cpp Index:

[PATCH] D21348: [libcxx] [test] Improve portability of vector tests.

2016-06-14 Thread Stephan T. Lavavej via cfe-commits
STL_MSFT created this revision. STL_MSFT added reviewers: EricWF, mclow.lists. STL_MSFT added a subscriber: cfe-commits. Improve portability of vector tests. This test was assuming libcxx's 2x growth factor, which isn't guaranteed by the Standard and isn't provided by MSVC (we use 1.5x). As a

[PATCH] D21350: [libcxx] [test] Avoid C++17 terse static_assert.

2016-06-14 Thread Stephan T. Lavavej via cfe-commits
STL_MSFT created this revision. STL_MSFT added reviewers: EricWF, mclow.lists. STL_MSFT added a subscriber: cfe-commits. TOTALLY OPTIONAL, feel free to reject this, I won't mind. Newly-added libcxx tests for C++17 features have been using C++17 terse static_asserts occasionally. This is

Re: [PATCH] D21345: [libcxx] [test] Avoid huge main() functions and huge arrays.

2016-06-14 Thread Stephan T. Lavavej via cfe-commits
STL_MSFT added a comment. I gotta wait for them, I don't have commit access. :-> (Nor do I need it at the moment) Haven't encountered problems with those locale tests yet, although I'm still processing 670-ish compiletime and runtime failures. http://reviews.llvm.org/D21345

[PATCH] D21587: [libcxx] [test] Fix comment typos, strip trailing whitespace. No code changes.

2016-06-21 Thread Stephan T. Lavavej via cfe-commits
STL_MSFT created this revision. STL_MSFT added reviewers: EricWF, mclow.lists. STL_MSFT added a subscriber: cfe-commits. Fix comment typos, strip trailing whitespace. No code changes. http://reviews.llvm.org/D21587 Files:

[PATCH] D21585: [libcxx] [test] Silence MSVC's spurious "warning C4100: 'p': unreferenced formal parameter".

2016-06-21 Thread Stephan T. Lavavej via cfe-commits
STL_MSFT created this revision. STL_MSFT added reviewers: EricWF, mclow.lists. STL_MSFT added a subscriber: cfe-commits. Silence MSVC's spurious "warning C4100: 'p': unreferenced formal parameter". This is a C1XX bug, tracked by VSO#188582. C1XX has found some good issues, so I would like to

RE: [PATCH] D21581: [libcxx] [test] Silence unused variable warnings in invoke.pass.cpp.

2016-06-21 Thread Stephan T. Lavavej via cfe-commits
Oops, that's because it touched the same file as my "avoid C++17 terse static_assert" patch, which hadn't been accepted yet. Thanks for fixing it up. STL -Original Message- From: Eric Fiselier [mailto:e...@efcs.ca] Sent: Tuesday, June 21, 2016 6:05 PM To: Stephan T. Lavavej

[PATCH] D21581: [libcxx] [test] Silence unused variable warnings in invoke.pass.cpp.

2016-06-21 Thread Stephan T. Lavavej via cfe-commits
STL_MSFT created this revision. STL_MSFT added reviewers: EricWF, mclow.lists. STL_MSFT added a subscriber: cfe-commits. Silence unused variable warnings in invoke.pass.cpp. Fixes MSVC warning C4101 "unreferenced local variable". http://reviews.llvm.org/D21581 Files:

[PATCH] D21582: [libcxx] [test] Avoid mixing assignment and returning.

2016-06-21 Thread Stephan T. Lavavej via cfe-commits
STL_MSFT created this revision. STL_MSFT added reviewers: EricWF, mclow.lists. STL_MSFT added a subscriber: cfe-commits. Avoid mixing assignment and returning. "return locked = true;" looks really suspicious, even though it happens to be correct here. Spend an extra statement to make the code

[PATCH] D21583: [libcxx] [test] Make unord.hash/integral.pass.cpp portable.

2016-06-21 Thread Stephan T. Lavavej via cfe-commits
STL_MSFT created this revision. STL_MSFT added reviewers: EricWF, mclow.lists. STL_MSFT added a subscriber: cfe-commits. Make unord.hash/integral.pass.cpp portable. This was assuming identity hashing, which is a non-Standard assumption. Guarding this with LIBCPP_ASSERT makes the test portable.

[PATCH] D21584: [libcxx] [test] Fix an operator precedence mistake in valarray.unary/not.pass.cpp.

2016-06-21 Thread Stephan T. Lavavej via cfe-commits
STL_MSFT created this revision. STL_MSFT added reviewers: EricWF, mclow.lists. STL_MSFT added a subscriber: cfe-commits. Fix an operator precedence mistake in valarray.unary/not.pass.cpp. This one was sneaky - the test happened to be passing, but totally by accident. You can thank MSVC warning

[PATCH] D21625: [libcxx] [test] Mark throw_bad_alloc_helper() as [[noreturn]].

2016-06-22 Thread Stephan T. Lavavej via cfe-commits
STL_MSFT created this revision. STL_MSFT added reviewers: EricWF, mclow.lists. STL_MSFT added a subscriber: cfe-commits. Mark throw_bad_alloc_helper() as [[noreturn]]. This avoids MSVC /analyze warnings about new returning null, since [[noreturn]] allows the analyzer to see what's happening.

[PATCH] D21629: [libcxx] [test] Add assertions to quiet analysis warnings about array bounds.

2016-06-22 Thread Stephan T. Lavavej via cfe-commits
STL_MSFT created this revision. STL_MSFT added reviewers: EricWF, mclow.lists. STL_MSFT added a subscriber: cfe-commits. Add assertions to quiet analysis warnings about array bounds. In the partial_sort tests, the N >= M assertion is just a good sanity check, to detect bogus testcases. MSVC's

Re: [PATCH] D21717: [libcxx] [test] Make dtor_noexcept.pass.cpp tests more portable.

2016-06-27 Thread Stephan T. Lavavej via cfe-commits
STL_MSFT updated this revision to Diff 62001. STL_MSFT added a comment. Adding test_macros.h as requested. http://reviews.llvm.org/D21717 Files: test/std/containers/associative/map/map.cons/dtor_noexcept.pass.cpp test/std/containers/associative/multimap/multimap.cons/dtor_noexcept.pass.cpp

Re: [PATCH] D21718: [libcxx] [test] Make move_assign_noexcept.pass.cpp tests more portable.

2016-06-27 Thread Stephan T. Lavavej via cfe-commits
STL_MSFT updated this revision to Diff 62003. STL_MSFT added a comment. Population, 9 billion. All test macros. http://reviews.llvm.org/D21718 Files: test/std/containers/associative/map/map.cons/move_assign_noexcept.pass.cpp

Re: [PATCH] D21716: [libcxx] [test] Make move_noexcept.pass.cpp tests more portable.

2016-06-27 Thread Stephan T. Lavavej via cfe-commits
STL_MSFT updated this revision to Diff 62002. STL_MSFT added a comment. Test macros for the test macro throne! http://reviews.llvm.org/D21716 Files: test/std/containers/associative/map/map.cons/move_noexcept.pass.cpp

[PATCH] D21713: [libcxx] [test] Use L"cat" L"dog" when concatenating string literals.

2016-06-24 Thread Stephan T. Lavavej via cfe-commits
STL_MSFT created this revision. STL_MSFT added reviewers: EricWF, mclow.lists. STL_MSFT added a subscriber: cfe-commits. Use L"cat" L"dog" when concatenating string literals. MSVC dislikes seeing L"23" "\x65F6". It's actually unclear to me what the Standard says here - I suspect that MSVC is

[PATCH] D21718: [libcxx] [test] Make move_assign_noexcept.pass.cpp tests more portable.

2016-06-24 Thread Stephan T. Lavavej via cfe-commits
STL_MSFT created this revision. STL_MSFT added reviewers: EricWF, mclow.lists. STL_MSFT added a subscriber: cfe-commits. Make move_assign_noexcept.pass.cpp tests more portable. Note that the relevant wording here was modified by C++17 N4258 "Cleaning-up noexcept in the Library (Rev 3)", which

[PATCH] D21717: [libcxx] [test] Make dtor_noexcept.pass.cpp tests more portable.

2016-06-24 Thread Stephan T. Lavavej via cfe-commits
STL_MSFT created this revision. STL_MSFT added reviewers: EricWF, mclow.lists. STL_MSFT added a subscriber: cfe-commits. Make dtor_noexcept.pass.cpp tests more portable. They were static_asserting that in certain situations, the following things have throwing destructors: ordered/unordered

[PATCH] D21715: [libcxx] [test] Make default_noexcept.pass.cpp tests more portable.

2016-06-24 Thread Stephan T. Lavavej via cfe-commits
STL_MSFT created this revision. STL_MSFT added reviewers: EricWF, mclow.lists. STL_MSFT added a subscriber: cfe-commits. Make default_noexcept.pass.cpp tests more portable. They were static_asserting that the following things are nothrow-default-constructible: ordered/unordered associative

[PATCH] D21716: [libcxx] [test] Make move_noexcept.pass.cpp tests more portable.

2016-06-24 Thread Stephan T. Lavavej via cfe-commits
STL_MSFT created this revision. STL_MSFT added reviewers: EricWF, mclow.lists. STL_MSFT added a subscriber: cfe-commits. Make move_noexcept.pass.cpp tests more portable. They were static_asserting that the following things are nothrow-move-constructible: ordered/unordered associative

[PATCH] D21712: [libcxx] [test] Avoid narrowing conversions in quoted.pass.cpp.

2016-06-24 Thread Stephan T. Lavavej via cfe-commits
STL_MSFT created this revision. STL_MSFT added reviewers: EricWF, mclow.lists. STL_MSFT added a subscriber: cfe-commits. Avoid narrowing conversions in quoted.pass.cpp. According to the Standard, when char has a signed range and wchar_t has an unsigned range, brace-init has to reject the

[PATCH] D21714: [libcxx] [test] In atomics.types.generic/address.pass.cpp, use T(0) for consistency.

2016-06-24 Thread Stephan T. Lavavej via cfe-commits
STL_MSFT created this revision. STL_MSFT added reviewers: EricWF, mclow.lists. STL_MSFT added a subscriber: cfe-commits. In atomics.types.generic/address.pass.cpp, use T(0) for consistency. Fixes MSVC "error C2593: 'operator ==' is ambiguous". There is almost certainly an MSVC compiler bug

[PATCH] D19565: [libc++] Fix an accidental assignment within assert() that should have been equality.

2016-04-26 Thread Stephan T. Lavavej via cfe-commits
STL_MSFT created this revision. STL_MSFT added reviewers: EricWF, mclow.lists. STL_MSFT added a subscriber: cfe-commits. [libc++] Fix an accidental assignment within assert() that should have been equality. Fixes MSVC "warning C4706: assignment within conditional expression".

RE: r267534 - [MSVC] PR27337: allow static_cast from private base to derived for WTL

2016-04-27 Thread Stephan T. Lavavej via cfe-commits
[Dmitry Polukhin] > As for 'A*' to 'B*" case, indeed it is not very common and it looks like > someone just forgot to specify 'public'. If we're doing something gratuitously nonconformant in MS product code or even sample code, you should report it to us, so we can fix it upstream, instead of

RE: r267534 - [MSVC] PR27337: allow static_cast from private base to derived for WTL

2016-04-27 Thread Stephan T. Lavavej via cfe-commits
[Richard Smith] > You can find a description of the problem in http://llvm.org/PR27337 > Brief summary: > The WTL bug is the missing 'public' on the second base class on this line: > https://sourceforge.net/p/wtl/code/HEAD/tree/trunk/wtl/Samples/MDIDocVw/mainfrm.h#l636 > The C1xx bug is that it

[PATCH] D19620: [libc++] Add braces, move braces, and rename variables to avoid shadowing.

2016-04-27 Thread Stephan T. Lavavej via cfe-commits
STL_MSFT created this revision. STL_MSFT added reviewers: mclow.lists, EricWF. STL_MSFT added a subscriber: cfe-commits. [libc++] Add braces, move braces, and rename variables to avoid shadowing. Fixes MSVC "warning C4456: declaration of 'meow' hides previous local declaration".

[PATCH] D19625: [libc++] Void-cast runtime-unused variables.

2016-04-27 Thread Stephan T. Lavavej via cfe-commits
STL_MSFT created this revision. STL_MSFT added reviewers: mclow.lists, EricWF. STL_MSFT added a subscriber: cfe-commits. [libc++] Void-cast runtime-unused variables. Also, remove unused names in exception handlers and remove an unused array. Fixes MSVC "warning C4101: unreferenced local

[PATCH] D19621: [libc++] Rename function parameters to avoid shadowing.

2016-04-27 Thread Stephan T. Lavavej via cfe-commits
STL_MSFT created this revision. STL_MSFT added reviewers: mclow.lists, EricWF. STL_MSFT added a subscriber: cfe-commits. [libc++] Rename function parameters to avoid shadowing. Fixes MSVC "warning C4459: declaration of 'meow' hides global declaration". http://reviews.llvm.org/D19621 Files:

[PATCH] D19622: [libc++] Implement the member functions of a local struct.

2016-04-27 Thread Stephan T. Lavavej via cfe-commits
STL_MSFT created this revision. STL_MSFT added reviewers: EricWF, mclow.lists. STL_MSFT added a subscriber: cfe-commits. [libc++] Implement the member functions of a local struct. Fixes MSVC "warning C4822: local class member function does not have a body". http://reviews.llvm.org/D19622

[PATCH] D19623: [libc++] Initialize local doubles to 0.0.

2016-04-27 Thread Stephan T. Lavavej via cfe-commits
STL_MSFT created this revision. STL_MSFT added reviewers: EricWF, mclow.lists. STL_MSFT added a subscriber: cfe-commits. [libc++] Initialize local doubles to 0.0. (Zero is a strict subset of garbage.) Fixes MSVC "warning C4701: potentially uninitialized local variable 'meow' used".

[PATCH] D19619: [libc++] Remove the names of unreferenced parameters.

2016-04-27 Thread Stephan T. Lavavej via cfe-commits
STL_MSFT created this revision. STL_MSFT added reviewers: EricWF, mclow.lists. STL_MSFT added a subscriber: cfe-commits. [libc++] Remove the names of unreferenced parameters. Fixes MSVC "warning C4100: unreferenced formal parameter". http://reviews.llvm.org/D19619 Files:

[PATCH] D19618: [libc++] Consistently guard "#pragma clang" with "#if defined(__clang__)".

2016-04-27 Thread Stephan T. Lavavej via cfe-commits
STL_MSFT created this revision. STL_MSFT added reviewers: mclow.lists, EricWF. STL_MSFT added a subscriber: cfe-commits. [libc++] Consistently guard "#pragma clang" with "#if defined(__clang__)". Similarly, consistently guard "#pragma GCC" with "#if defined(__GNUC__)". Fixes MSVC "warning

Re: [PATCH] D19623: [libc++] Initialize local doubles to 0.0.

2016-04-27 Thread Stephan T. Lavavej via cfe-commits
STL_MSFT added a comment. I'd be happy to deal with this in another way. Would you accept _MSC_VER-guarded pragmas to silence such warnings? I didn't see an easy way to rework the logic here so that the variables are obviously initialized on every codepath, which would be the ideal pragma-less

[PATCH] D19759: [libcxx] [test] Replace one more occurrence of non-Standard std::launch::any with AnyPolicy.

2016-04-29 Thread Stephan T. Lavavej via cfe-commits
STL_MSFT created this revision. STL_MSFT added reviewers: EricWF, mclow.lists. STL_MSFT added a subscriber: cfe-commits. [libcxx] [test] Replace one more occurrence of non-Standard std::launch::any with AnyPolicy. Also, fix MSVC "warning C4101: 'ex': unreferenced local variable".

[PATCH] D19758: [libcxx] [test] Replace non-Standard "atomic_flag f(false); " with Standard "atomic_flag f = ATOMIC_FLAG_INIT; ".

2016-04-29 Thread Stephan T. Lavavej via cfe-commits
STL_MSFT created this revision. STL_MSFT added reviewers: EricWF, mclow.lists. STL_MSFT added a subscriber: cfe-commits. [libcxx] [test] Replace non-Standard "atomic_flag f(false);" with Standard "atomic_flag f = ATOMIC_FLAG_INIT;". The test init03.pass.cpp is explicitly testing this

Re: [PATCH] D19625: [libc++] Void-cast runtime-unused variables.

2016-04-29 Thread Stephan T. Lavavej via cfe-commits
STL_MSFT updated the summary for this revision. STL_MSFT updated this revision to Diff 55683. STL_MSFT added a comment. This moves "str" as requested. It also adds void casts to another file, and removes an unused argc/argv pair. http://reviews.llvm.org/D19625 Files:

RE: [PATCH] D19625: [libc++] Void-cast runtime-unused variables.

2016-04-29 Thread Stephan T. Lavavej via cfe-commits
[David Blaikie] > Unused-variable seems pretty low value. Yeah, but it still has the potential to detect mistakes (e.g. typos, or code you intended to write but forgot about). I figured I'd submit a patch, since there weren't actually that many occurrences, and they were all easy to silence in

Re: [PATCH] D19625: [libc++] Void-cast runtime-unused variables.

2016-04-29 Thread Stephan T. Lavavej via cfe-commits
STL_MSFT marked 2 inline comments as done. STL_MSFT added a comment. What I'm doing is running libcxx's tests against MSVC's compiler and libraries. I could aggressively suppress warnings (and indeed I'm doing that for the noisiest, lowest-value warnings), but instead I'm building the tests

RE: [PATCH] D19625: [libc++] Void-cast runtime-unused variables.

2016-04-29 Thread Stephan T. Lavavej via cfe-commits
[STL] > When my work is finished (currently 3132 tests are passing out of 4541), I > expect that > we'll start running libcxx's tests in our automation, which will detect > regressions rapidly and reliably. [David Blaikie] > It'd be great to have this sort of stuff upstream (in a public facing

RE: [PATCH] D19622: [libc++] Implement the member functions of a local struct.

2016-04-29 Thread Stephan T. Lavavej via cfe-commits
[Sebastian Redl] > I rail against this warning here: > http://stackoverflow.com/questions/18979503/why-locally-defined-struct-in-function-need-assignment-operator-copy-construct/18979812#18979812 > It's not just that the warning is silly, it's also a level 1 warning, which > is extra-silly.

[PATCH] D19698: [libcxx] [test] Need to include for std::unique_ptr.

2016-04-28 Thread Stephan T. Lavavej via cfe-commits
STL_MSFT created this revision. STL_MSFT added reviewers: EricWF, mclow.lists. STL_MSFT added a subscriber: cfe-commits. [libcxx] [test] Need to include for std::unique_ptr. Fixes MSVC "error C2039: 'unique_ptr': is not a member of 'std'". http://reviews.llvm.org/D19698 Files:

[PATCH] D19701: [libcxx] [test] Remove more names of unreferenced parameters.

2016-04-28 Thread Stephan T. Lavavej via cfe-commits
STL_MSFT created this revision. STL_MSFT added reviewers: EricWF, mclow.lists. STL_MSFT added a subscriber: cfe-commits. [libcxx] [test] Remove more names of unreferenced parameters. Fixes MSVC "warning C4100: unreferenced formal parameter". http://reviews.llvm.org/D19701 Files:

[PATCH] D19699: [libcxx] [test] Need to include for its streaming operators.

2016-04-28 Thread Stephan T. Lavavej via cfe-commits
STL_MSFT created this revision. STL_MSFT added reviewers: EricWF, mclow.lists. STL_MSFT added a subscriber: cfe-commits. [libcxx] [test] Need to include for its streaming operators. Fixes MSVC errors: "error C2678: binary '>>': no operator found which takes a left-hand operand of type

Re: [PATCH] D19623: [libcxx] [test] Initialize local doubles to NaN.

2016-04-28 Thread Stephan T. Lavavej via cfe-commits
STL_MSFT retitled this revision from "[libc++] Initialize local doubles to 0.0." to "[libcxx] [test] Initialize local doubles to NaN.". STL_MSFT updated the summary for this revision. STL_MSFT updated this revision to Diff 55506. STL_MSFT added a comment. Now I'm using NaN instead of 0.0 for the

[PATCH] D19702: [libcxx] [test] Fix get_temp_file_name() to compile for Windows.

2016-04-28 Thread Stephan T. Lavavej via cfe-commits
STL_MSFT created this revision. STL_MSFT added reviewers: EricWF, mclow.lists. STL_MSFT added a subscriber: cfe-commits. [libcxx] [test] Fix get_temp_file_name() to compile for Windows. It was including but attempting to use GetTempPath() and GetTempFileName(), which are provided by . Instead

[PATCH] D19700: [libcxx] [test] nasty_mutex::operator& should return nullptr, like nasty_list above it.

2016-04-28 Thread Stephan T. Lavavej via cfe-commits
STL_MSFT created this revision. STL_MSFT added reviewers: EricWF, mclow.lists. STL_MSFT added a subscriber: cfe-commits. [libcxx] [test] nasty_mutex::operator& should return nullptr, like nasty_list above it. Fixes MSVC "error C4716: 'nasty_mutex::operator&': must return a value".

RE: [PATCH] D19700: [libcxx] [test] nasty_mutex::operator& should return nullptr, like nasty_list above it.

2016-04-28 Thread Stephan T. Lavavej via cfe-commits
[Eric Fiselier] > Well arguable it should be `no return` or even better it should > have an "= delete" so it's diagnosed even if it's not called. > For now this works though. Agreed - I just wasn't sure what this code was trying to do, and I figured it should be consistent. I'm trying to keep

Re: [PATCH] D19625: [libc++] Void-cast runtime-unused variables.

2016-04-28 Thread Stephan T. Lavavej via cfe-commits
STL_MSFT added a comment. Are there any issues with these changes? I tried to follow the existing practice for void-casting, including the comment (although the comments varied). http://reviews.llvm.org/D19625 ___ cfe-commits mailing list

RE: [PATCH] D19702: [libcxx] [test] Fix get_temp_file_name() to compile for Windows.

2016-04-28 Thread Stephan T. Lavavej via cfe-commits
[David Majnemer] > Er, I don't think mingw provides _mktemp_s. Yeah, I don't know what needs to be done for MinGW. (I avoided using _mktemp for MSVC because I knew it would complain about "security".) I am pretty sure that this code was already broken for MinGW - I grepped and found no

Re: [PATCH] D19623: [libcxx] [test] Initialize local doubles to NaN.

2016-04-29 Thread Stephan T. Lavavej via cfe-commits
STL_MSFT added a comment. According to my equally vague understanding, a quiet NaN (if used in operations, instead of being overwritten with something valid) will silently propagate down to the assert, which will complain that it's not equal to whatever you were expecting. That would detect

Re: [PATCH] D19625: [libc++] Void-cast runtime-unused variables.

2016-05-02 Thread Stephan T. Lavavej via cfe-commits
STL_MSFT added a comment. No problem! With these changes, my test runs are currently clean wrt "warning C4100: unreferenced formal parameter" and "warning C4101: unreferenced local variable", but note that (1) Clang may emit unused-variable warnings in somewhat different situations, and (2)

Re: [PATCH] D19758: [libcxx] [test] Replace non-Standard "atomic_flag f(false); " with Standard "atomic_flag f = ATOMIC_FLAG_INIT; ".

2016-05-02 Thread Stephan T. Lavavej via cfe-commits
STL_MSFT added a comment. Makes sense. MSVC will never have C++03 or C++11 modes (only 14/17/future) so anything you do in C++03 mode is fine by me. http://reviews.llvm.org/D19758 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

Re: [PATCH] D19758: [libcxx] [test] Replace non-Standard "atomic_flag f(false); " with Standard "atomic_flag f = ATOMIC_FLAG_INIT; ".

2016-05-02 Thread Stephan T. Lavavej via cfe-commits
STL_MSFT added a comment. Since you control the definition of ATOMIC_FLAG_INIT, can you make it something like __secret_tag_type() in C++03? That would allow you to continue to provide the atomic_flag(bool) extension in C++03. http://reviews.llvm.org/D19758

Re: [PATCH] D19758: [libcxx] [test] Replace non-Standard "atomic_flag f(false); " with Standard "atomic_flag f; "

2016-05-02 Thread Stephan T. Lavavej via cfe-commits
STL_MSFT added a comment. I think this will work for me. Thanks! http://reviews.llvm.org/D19758 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D22972: [libcxx] [test] Fix an MSVC x64 compiler error due to mismatched iterator types.

2016-07-29 Thread Stephan T. Lavavej via cfe-commits
STL_MSFT created this revision. STL_MSFT added reviewers: EricWF, mclow.lists. STL_MSFT added a subscriber: cfe-commits. Fix an MSVC x64 compiler error due to mismatched iterator types. This was attempting to store a list::iterator in a list::iterator. That isn't guaranteed

[PATCH] D22971: [libcxx] [test] Fix an MSVC x64 compiler warning.

2016-07-29 Thread Stephan T. Lavavej via cfe-commits
STL_MSFT created this revision. STL_MSFT added reviewers: EricWF, mclow.lists. STL_MSFT added a subscriber: cfe-commits. Fix an MSVC x64 compiler warning, "warning C4312: 'type cast': conversion from 'unsigned int' to 'int *' of greater size". The warning (which is valuable) is simple to avoid:

[PATCH] D22973: [libcxx] [test] Add TEST_STACK_ALLOCATOR_WORKAROUND.

2016-07-29 Thread Stephan T. Lavavej via cfe-commits
STL_MSFT created this revision. STL_MSFT added reviewers: EricWF, mclow.lists. STL_MSFT added a subscriber: cfe-commits. Add TEST_STACK_ALLOCATOR_WORKAROUND. As I reported to Eric and Marshall: "stack_allocator is seriously nonconformant to N4582 17.6.3.5 [allocator.requirements]. First,

[PATCH] D22818: [libcxx] [test] Silence another occurrence of MSVC's spurious unused warning.

2016-07-26 Thread Stephan T. Lavavej via cfe-commits
STL_MSFT created this revision. STL_MSFT added reviewers: EricWF, mclow.lists. STL_MSFT added a subscriber: cfe-commits. Silence another occurrence of MSVC's spurious unused warning. Again, I'm sorry about this one (VSO#188582 tracks the need to fix the compiler), but this targeted suppression

RE: [PATCH] D22818: [libcxx] [test] Silence another occurrence of MSVC's spurious unused warning.

2016-07-26 Thread Stephan T. Lavavej via cfe-commits
I've added a note to myself (in the list of "bugs I need fixes for") that these two suppressions should be removed when the compiler bug is finally fixed. JonCaves actually marked this as Fix Available on July 20, so a fix may be forthcoming in the near future. STL -Original Message-

[PATCH] D22819: [libcxx] [test] Add env.lst and keep.lst to .gitignore for the MSVC libraries test harness.

2016-07-26 Thread Stephan T. Lavavej via cfe-commits
STL_MSFT created this revision. STL_MSFT added reviewers: EricWF, mclow.lists. STL_MSFT added a subscriber: cfe-commits. This is optional, but I think it would be convenient if we could upstream the ignoring of env.lst and keep.lst files that our test harness automatically generates.

[PATCH] D21820: [libcxx] [test] Make swap_noexcept.pass.cpp tests more portable.

2016-06-28 Thread Stephan T. Lavavej via cfe-commits
STL_MSFT created this revision. STL_MSFT added reviewers: EricWF, mclow.lists. STL_MSFT added a subscriber: cfe-commits. Make swap_noexcept.pass.cpp tests more portable. These tests define types like some_alloc, which dramatically fail to meet the allocator requirements. They don't even have

[PATCH] D22014: [libcxx] [test] Follow LWG 2520 "N4089 broke initializing unique_ptr<T[]> from a nullptr".

2016-07-05 Thread Stephan T. Lavavej via cfe-commits
STL_MSFT created this revision. STL_MSFT added reviewers: EricWF, mclow.lists. STL_MSFT added a subscriber: cfe-commits. Follow LWG 2520 "N4089 broke initializing unique_ptr from a nullptr". This library issue permits nullptr, but not 0 or NULL (which can be 0). In null_ctor.pass.cpp,

[PATCH] D22016: [libcxx] [test] Fix a non-Standard allocator in vector.cons/construct_iter_iter_alloc.pass.cpp.

2016-07-05 Thread Stephan T. Lavavej via cfe-commits
STL_MSFT created this revision. STL_MSFT added reviewers: EricWF, mclow.lists. STL_MSFT added a subscriber: cfe-commits. Fix a non-Standard allocator in vector.cons/construct_iter_iter_alloc.pass.cpp. You gotta have a rebinding constructor. MSVC loves rebinding. http://reviews.llvm.org/D22016

[PATCH] D22012: [libcxx] [tests] Add missing includes, especially , to priority.queue/types.pass.cpp.

2016-07-05 Thread Stephan T. Lavavej via cfe-commits
STL_MSFT created this revision. STL_MSFT added reviewers: EricWF, mclow.lists. STL_MSFT added a subscriber: cfe-commits. Add missing includes, especially , to priority.queue/types.pass.cpp. This is required according to the Standard, and it fixes compiler errors with MSVC (as our headers don't

[PATCH] D22013: [libcxx] [test] bind's function call operator isn't guaranteed to SFINAE.

2016-07-05 Thread Stephan T. Lavavej via cfe-commits
STL_MSFT created this revision. STL_MSFT added reviewers: EricWF, mclow.lists. STL_MSFT added a subscriber: cfe-commits. bind's function call operator isn't guaranteed to SFINAE. There's nothing in the Standard that specifies this, and MSVC's implementation doesn't do it (we explode in a tuple

[PATCH] D22155: [libcxx] [test] Fix portability issues in tests.

2016-07-08 Thread Stephan T. Lavavej via cfe-commits
STL_MSFT created this revision. STL_MSFT added reviewers: EricWF, mclow.lists. STL_MSFT added a subscriber: cfe-commits. Fix portability issues in tests. Three tests were asserting equal() after shuffling a sequence, which assumes the exact behavior of libc++'s implementation. To be portable,

[PATCH] D22157: [libcxx] [test] Mark bucket() assertions as nonportable.

2016-07-08 Thread Stephan T. Lavavej via cfe-commits
STL_MSFT created this revision. STL_MSFT added reviewers: EricWF, mclow.lists. STL_MSFT added a subscriber: cfe-commits. Mark bucket() assertions as nonportable. The Standard doesn't guarantee what bucket an element will land in, even if you control the hash. All such assertions are inherently

[PATCH] D22159: [libcxx] [test] Mark bucket_size() assertions as nonportable.

2016-07-08 Thread Stephan T. Lavavej via cfe-commits
STL_MSFT created this revision. STL_MSFT added reviewers: EricWF, mclow.lists. STL_MSFT added a subscriber: cfe-commits. Mark bucket_size() assertions as nonportable. Even if you control the hash, the Standard doesn't guarantee what the bucket population sizes will be. All of these assertions

[PATCH] D22165: [libcxx] [test] Make bucket_count() greater-equal assertions portable.

2016-07-08 Thread Stephan T. Lavavej via cfe-commits
STL_MSFT created this revision. STL_MSFT added reviewers: EricWF, mclow.lists. STL_MSFT added a subscriber: cfe-commits. Make bucket_count() greater-equal assertions portable. The Standard provides a guarantee here, but these assertions were going beyond that guarantee. These containers have 8

[PATCH] D22059: [libcxx] [test] Fix MSVC "warning C4100: 'val': unreferenced formal parameter".

2016-07-06 Thread Stephan T. Lavavej via cfe-commits
STL_MSFT created this revision. STL_MSFT added reviewers: EricWF, mclow.lists. STL_MSFT added a subscriber: cfe-commits. Fix MSVC "warning C4100: 'val': unreferenced formal parameter". http://reviews.llvm.org/D22059 Files:

Re: [PATCH] D21349: [libcxx] [test] Fix a typo in commented-out code.

2016-07-06 Thread Stephan T. Lavavej via cfe-commits
STL_MSFT closed this revision. STL_MSFT added a comment. Closing - Marshall fixed the typo and uncommented the code. http://reviews.llvm.org/D21349 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D22017: [libcxx] [test] Work around MSVC's non-Standard ABI for enums.

2016-07-05 Thread Stephan T. Lavavej via cfe-commits
STL_MSFT created this revision. STL_MSFT added reviewers: EricWF, mclow.lists. STL_MSFT added a subscriber: cfe-commits. Work around MSVC's non-Standard ABI for enums. So this is definitely an MSVC bug, but one that's baked into our layout behavior, so even Clang has to enable it

[PATCH] D21870: [libcxx] [test] Avoid applying unary minus to unsigned integers.

2016-06-29 Thread Stephan T. Lavavej via cfe-commits
STL_MSFT created this revision. STL_MSFT added reviewers: EricWF, mclow.lists. STL_MSFT added a subscriber: cfe-commits. Avoid applying unary minus to unsigned integers. This is confusing because first you have to remember what unsigned negation does, then you have to worry about the usual

[PATCH] D21872: [libcxx] [test] Fix unary_function inheritance assumption.

2016-06-29 Thread Stephan T. Lavavej via cfe-commits
STL_MSFT created this revision. STL_MSFT added reviewers: EricWF, mclow.lists. STL_MSFT added a subscriber: cfe-commits. Fix unary_function inheritance assumption. C++11 didn't require std::hash to derive from std::unary_function. The portable thing to do is to inspect the typedefs, as the

[PATCH] D21874: [libcxx] [test] std::array's iterators aren't guaranteed to be pointers.

2016-06-29 Thread Stephan T. Lavavej via cfe-commits
STL_MSFT created this revision. STL_MSFT added reviewers: EricWF, mclow.lists. STL_MSFT added a subscriber: cfe-commits. std::array's iterators aren't guaranteed to be pointers. Include test_macros.h and mark these static_asserts as libcxx-specific. http://reviews.llvm.org/D21874 Files:

[PATCH] D21876: [libcxx] [test] Make istreambuf.iterator/types.pass.cpp more portable.

2016-06-29 Thread Stephan T. Lavavej via cfe-commits
STL_MSFT created this revision. STL_MSFT added reviewers: EricWF, mclow.lists. STL_MSFT added a subscriber: cfe-commits. Make istreambuf.iterator/types.pass.cpp more portable. There are two issues here. First, istreambuf_iterator::pointer is unspecified (and MSVC uses a different type). Second,

[PATCH] D21879: [libcxx] [test] Fix MSVC "warning C4100: 'argv': unreferenced formal parameter".

2016-06-29 Thread Stephan T. Lavavej via cfe-commits
STL_MSFT created this revision. STL_MSFT added reviewers: EricWF, mclow.lists. STL_MSFT added a subscriber: cfe-commits. Fix MSVC "warning C4100: 'argv': unreferenced formal parameter". http://reviews.llvm.org/D21879 Files:

[PATCH] D21877: [libcxx] [test] is_swappable_include_order.pass.cpp was using a terse static_assert.

2016-06-29 Thread Stephan T. Lavavej via cfe-commits
STL_MSFT created this revision. STL_MSFT added reviewers: EricWF, mclow.lists. STL_MSFT added a subscriber: cfe-commits. is_swappable_include_order.pass.cpp was using a terse static_assert. As before, this unnecessarily limits compatibility with MSVC and old versions of GCC.

[PATCH] D21878: [libcxx] [test] Make futures.overview/future_errc.pass.cpp and launch.pass.cpp more portable.

2016-06-29 Thread Stephan T. Lavavej via cfe-commits
STL_MSFT created this revision. STL_MSFT added reviewers: EricWF, mclow.lists. STL_MSFT added a subscriber: cfe-commits. Make futures.overview/future_errc.pass.cpp and launch.pass.cpp more portable. future_errc.pass.cpp was assuming specific values, which aren't guaranteed by the Standard, and

[PATCH] D21875: [libcxx] [test] The Standard requires meow_insert_iterator::reference to be void.

2016-06-29 Thread Stephan T. Lavavej via cfe-commits
STL_MSFT created this revision. STL_MSFT added reviewers: EricWF, mclow.lists. STL_MSFT added a subscriber: cfe-commits. The Standard requires meow_insert_iterator::reference to be void. This is a libcxx product and test bug, since the type is observable. Mark these static_asserts as

[PATCH] D21871: [libcxx] [test] Make vector.bool/construct_default.pass.cpp more portable.

2016-06-29 Thread Stephan T. Lavavej via cfe-commits
STL_MSFT created this revision. STL_MSFT added reviewers: EricWF, mclow.lists. STL_MSFT added a subscriber: cfe-commits. Make vector.bool/construct_default.pass.cpp more portable. vector's default ctor and allocator ctor aren't depicted as noexcept in the Working Paper. We're already directly

Re: [PATCH] D21871: [libcxx] [test] Make vector.bool/construct_default.pass.cpp more portable.

2016-07-01 Thread Stephan T. Lavavej via cfe-commits
STL_MSFT abandoned this revision. STL_MSFT added a comment. Nah, they can totally be noexcept like the primary template. Usually we don't strengthen beyond the WP, but the wording is so clearly defective here, I'll go ahead and do this. No test changes necessary now.

  1   2   3   >