Граф коммитов

247 Коммитов

Автор SHA1 Сообщение Дата
Casey Carter ae34ee631f
Require MSVC 19.26 and Clang 10 in the STL (#708)
* `<yvals_core.h>` changes:
  * Clang 10 `_HAS_CONDITIONAL_EXPLICIT` in C++14 mode (Only CUDA now requires the `_HAS_CONDITIONAL_EXPLICIT == 0` code paths)
  * reject Clang < 10
  * reject MSVC < 1926

* Unskip libc++ tests that need Concepts and/or `<=>`

* `std/tests/P0595R2_is_constant_evaluated`: We no longer need  suppress the warning Clang 9 emits when it sees the suppression for the warning Clang 10 emits in this test ;)

* `std/tests/VSO_0157762_feature_test_macros`: Remove Clang 9 support

* `std/tests/concepts_matrix.lst`: This is now simply a copy of `usual_latest_matrix.lst` with the `/BE` lines (EDG configs) commented out. (i.e., we now run the Concepts tests with Clang as well as MSVC.)

* Remove workarounds for LLVM-38491 "clang-cl should accept __declspec(allocator)": Replace uses of `_DECLSPEC_ALLOCATOR` with `__declspec(allocator)`, and suppress Clang's warning when the return type isn't a pointer or reference.

* Remove workarounds for LLVM-43531 "clang-format damages 'alternative representations' for operators": Re-enable clang-format in the test which triggered the bug.

* Remove workarounds for LLVM-38478 "clang -fno-ms-compatibility rejects Windows.h": Add -fno-ms-compatibility to the XXX_winsdk_XXX.lst files. (Yes, we still need these because the Windows SDK breaks `/Za`.)

* Drive-by: unskip libc++ new.version now that we implement destroying delete
2020-04-13 13:09:34 -07:00
Stephan T. Lavavej a0fffa1076
Add a Question issue template (#687) 2020-04-10 19:10:32 -07:00
Michael Schellenberger Costa bda4230d58
<numeric> Optimize gcd to use builtins (#665)
* [numerics] Optimize gcd to use builtins

* Fix template argument deduction for _countl_zero

* Use the same casts as the other bit operations

* Update stl/inc/numeric

Fix tpyo

* Remove whitespace

Co-Authored-By: Stephan T. Lavavej <stl@nuwen.net>

* _BitScanForward is countr_zero(x), not countl_zero(~x)

Co-authored-by: Casey Carter <cartec69@gmail.com>
Co-authored-by: Stephan T. Lavavej <stl@nuwen.net>
Co-authored-by: Casey Carter <Casey@Carter.net>
2020-04-10 19:09:41 -07:00
Alex Guteniev 764f7cbd6f
<chrono>: Explain steady_clock::now frequency scaling (#658) 2020-04-10 19:08:31 -07:00
Casey Carter d0d059716e
Update FixNamespaceComments to true in various clang-format files (#681)
Now that LLVM-39247 has been fixed in Clang 10, we can enable this setting again. This PR does so in several Libs clang-format files which had a LLVM-39247 comment.

I've changed the end comments on unnamed namespaces from `// namespace`, which clang-format adds automatically, to `// unnamed namespace` which more clearly indicates that someone didn't simply forget to finish typing the comment.
2020-04-10 16:21:06 -07:00
Casey Carter 2a1a375b88
More Clang 10 support (#657)
* Minor test matrix cleanup:
  * Factor "/EHsc /std:c++latest" out of each config in `usual_latest_matrix.lst` and `usual_latest_winsdk_matrix.lst`
  * Remove unused `native_latest_matrix.lst`

* Avoid LLVM-45213 in `range_algorithm_support.hpp` and `std/tests/P0896R4_ranges_alg_all_of`

* <concepts> remove workaround for LLVM-44689 which is fixed in Clang 10
2020-04-10 15:58:11 -07:00
Stephan T. Lavavej 7a2ae687bc
validate.cpp: Validate paths for length and spaces (#699) 2020-04-09 22:54:59 -07:00
Adam Bucior 433b8a16b6
Implement P0718R2 atomic<shared_ptr<T>>, atomic<weak_ptr<T>> (#601) 2020-04-09 19:56:00 -07:00
Casey Carter 0055b5bf80
<yvals_core.h>: Fix <bit> feature-test macros (#695)
* Don't define `__cpp_lib_bitops` when `__EDG__`, so IntelliSense is consistent with MSVC
* Don't define `__cpp_lib_int_pow2` when `__cpp_lib_bitops` isn't defined since the facilities that correspond with `__cpp_lib_int_pow2` are only provided when `__cpp_lib_bitops` is defined.
* Update feature-test macro test accordingly

(See discussion starting at https://github.com/microsoft/STL/issues/313#issuecomment-585127653.)
2020-04-09 19:27:35 -07:00
Curtis J Bezault 2597e24586
Run format validation as its own stage and enable /BE (#682) 2020-04-09 18:46:00 -07:00
Adam Bucior a099e85ce3
P0674R1 make_shared() For Arrays (#309)
Fixes #33.

Co-authored-by: Gianni Weinand <t-giwein@microsoft.com>
Co-authored-by: Stephan T. Lavavej <stl@microsoft.com>
2020-04-08 12:23:05 -07:00
joemmett 714f499f4b
Library support for P0722R3 - Efficient sized delete for variable siz… (#692)
Library support for P0722R3 - Efficient sized delete for variable sized classes

Implements the struct type `std::destroying_delete_t`, variable
`std::destroying_delete`, and feature test macro
`__cpp_lib_destroying_delete` in C++20 mode with a compiler that defines
`__cpp_impl_destroying_delete`.
2020-04-08 09:38:43 -07:00
Casey Carter 22391019cb
Changes to support the compiler portion of P1152R4 "deprecating volatile" (#674)
* Updates for MSVC implementation of P1152R4 "deprecating volatile"

* Enable volatile deprecation warnings in STL's std and libcxx test suites

* `<any>`: `any_cast<T>` now returns `remove_cv_t<T>` because it's silly to have a cv-qualified return type (LWG issue submitted)
* `<optional>`: `optional<T>::value_or` now returns `remove_cv_t<T>` because it's silly to have a cv-qualified return type (LWG issue submitted).
* `<type_traits>`: suppress deprecation warnings around `_Implicitly_convert_to` so `_Implicitly_convert_to<volatile meow>(woof)` doesn't warn
* `<variant>`: Suppress deprecation warnings when forming the "imaginary" overload set `FUN` for the `variant(T&&)` constructor.
* Add the new warning C5215 "'%s' a function parameter with volatile qualified type is deprecated in C++20" to libc++'s "suppress deprecation warnings" macro and update llvm submodule reference.
* Skip libc++ test `containers/sequences/deque/deque.modifiers/insert_iter_iter.pass.cpp` after seeing one timeout too many in Contest logs.
* Suppress C5215 in `tr1/include/tfuns.h` which uses volatile function parameters, and in `tr1/functional4` altogether.
* Update skips for two libc++ tests that changed suffixes from `.sh.cpp` to `.pass.cpp`.

* Add a throwaway `addCompileFlags` function to `LibcxxTestFormat` to enable libc++ to continue working after upstream changes to pass configuration to the filesystem tests which we do not run.
2020-04-03 18:20:24 -07:00
Alex Guteniev 260cfafb63
<bitset>: Make bitset::all work like bitset::any (#671)
Fixes #669.
2020-04-02 21:50:14 -07:00
s00kee 43e07f3fad
Updated _MSVC_STL_UPDATE to April 2020 (#676)
Fixes #670.
2020-04-02 17:54:50 -07:00
Charlie Barto 3e8b26950f
Revert "Replace __pragma with _Pragma (#662)" (#675)
This reverts commit 42d5df07d0.

Reverting due to a bug in how /Zc:preprocessor handles _Pragma
see VSO-1091758 for more details

Co-authored-by: Charles <barto.charlie+code@gmail.com>
2020-04-02 14:44:09 -07:00
Charlie Barto ad389e3836 use build_testing option to toggle tests (#666)
Previously we were using ENABLE_TESTS to toggle testing on or off. I suppose this is a little more true to what it does than BUILD_TESTING, but BUILD_TESTING is the "standard" cmake option used for this kind of stuff by many projects.

Additionally we never added ENABLE_TESTS to the cache so it didn't show up in programs like cmake-gui, so I added it to the cache with a default value of "OFF" using the option() cmake command.

Co-authored-by: Charles <barto.charlie+code@gmail.com>
2020-04-02 13:23:34 -07:00
Miroslav Hrnčíř 42d5df07d0
Replace __pragma with _Pragma (#662)
* Replace __pragma with _Pragma

VS 2019 16.6 Preview 2 now supports Standard _Pragma.

* Fix formatting

* _Pragma takes a string
2020-04-01 18:41:51 -07:00
Billy O'Neal 20ad5586de
Update pull request template for tests-in-Azure infrastructure (#644)
Remove out of date parts of the pull request template, and put instructions to pull request submitters in a comment rather than duplicating them into each PR.
2020-04-01 16:22:01 -07:00
Andrew Marino dba4ef945c
Disable warning C4648 'standard attribute 'x' ignored' (#672)
In a future release of MSVC, the compiler warns with C4648 on uses of `[[no_unique_address]]`, which the compiler recognizes but does not yet implement. Since `<algorithm>` intentionally uses the attribute, disable the warning in STL headers. This mirrors changes in internal MSVC-PR-239026.
2020-04-01 16:18:00 -07:00
Sumit Bhardwaj 21944c188d
Add static_assert to is_sorted() for the lookup tables in validate.cpp (#650)
Co-authored-by: Sumit Bhardwaj <subhardw@microsoft.com>
2020-04-01 11:42:12 -07:00
Sumit Bhardwaj e1d9d8b303
Changing VCLIBS_SUFFIX to be a cache CMake variable (#649) 2020-04-01 11:41:55 -07:00
Damien 6d5372b027
lerp() noexcept is now required, so we should remove comments (#640) 2020-04-01 11:41:43 -07:00
Alex Guteniev 8e8453c677
<chrono>: Cache QueryPerformanceFrequency() (#646) 2020-03-31 17:35:28 -07:00
Gianni Georg Weinand 90bc6215e4
constexpr for std::array Comparisons (#599)
* Add constexpr to array comparison functions + change feature test macro.

* Fixed clang-format on array and moved comment in yvals_core.h

* Corrected feature test macro constant

* Removed libcxx test skip

* Added constexpr testing for array comparison operators

* clang-formatted the test file

* Added CXX20 feature test macro

* Fixed 0 size array initialization in test file.

* Test variables made global and const, removed to_array, fix typo

* clang-format test file

* Fixed typo, duplicate line and alignment in the constexpr operator test.

* clang-format array

* Changed const global variables to constexpr in test file.

* Removed double parenthesis in test file.

Co-Authored-By: Stephan T. Lavavej <stl@nuwen.net>

* Update tests/std/tests/P1023R0_constexpr_for_array_comparisons/test.cpp

Co-Authored-By: Stephan T. Lavavej <stl@nuwen.net>

* STL's suggestion to avoid disabling clang-format and shorten test.

* clang-format 10 array

* Removed test skip from expected_results.txt to match skipped_tests.txt

Co-authored-by: Stephan T. Lavavej <stl@nuwen.net>
2020-03-31 14:33:55 -07:00
Curtis J Bezault a1a45cc178
Add testing instructions to the README (#647)
Co-authored-by: Stephan T. Lavavej <stl@nuwen.net>
Co-authored-by: Casey Carter <cartec69@gmail.com>
2020-03-31 14:05:46 -07:00
Curtis J Bezault 811c8c1816
Add tr1 testsuite (#652) 2020-03-29 18:16:33 -07:00
Billy O'Neal ff83542af4
Update to Clang 10 and Visual Studio 2019 version 16.6p2 (#645)
* Update to Clang 10 and Visual Studio 2019 version 16.6p2

* re-clang-formats the tree to comply with new clang 10 clang-format
* updates our agents to F series VMs which are faster and cheaper for our build workloads
* defaults scale set to 0 VMs and lets the Azure Pipelines service control all resizing
* fix tests to pass with the new compilers

Co-authored by Casey Carter and Curtis Bezault
2020-03-28 18:53:15 -07:00
Curtis J Bezault 5f7933ce20
Add futures.unique_future/wait.pass.cpp to the skip lists (#641) 2020-03-27 08:29:26 -07:00
Charlie Barto e960db2d54
update cgmanifest (#643)
Co-authored-by: Charles <barto.charlie+code@gmail.com>
2020-03-26 23:03:35 -07:00
Curtis J Bezault 023980e72b
Try to run with fewer workers to avoid overwhelming VMs (#642) 2020-03-26 22:37:11 -07:00
Casey Carter 2849d9c39f
<concepts>: Implement is-default-initializable via placement new (#635)
`new T` is correctly ill-formed when `T` cannot be default-initialized (except on MSVC thanks to VSO-1084668).

Fixes #334.
2020-03-26 07:10:31 -07:00
Joyce Er 02043f812c
Remove comment following acceptance of LWG-3150 (#638)
Fixes #528.
2020-03-25 23:45:27 -07:00
WojciechMigda 603971feb8
Bump _MSVC_STL_UPDATE for March 2020 (#637)
Fixes #579.
2020-03-25 23:26:36 -07:00
Sven Haak 7a4d70ae96
<xutility>: strengthen noexcept for array iterators (#627)
Fixes #427.
2020-03-25 23:21:50 -07:00
Krystyna Lopez 6d88a8883e
Fix #239: Improve _Invoke_traits throughput (#408) 2020-03-25 23:14:14 -07:00
Curtis J Bezault 20f21b2248
Add tests using lit as a test harness (#520) 2020-03-25 13:56:03 -07:00
Billy O'Neal b75dd43d33
Add scripts to generate new Virtual Machine Scale Sets and images for build machines (#633) 2020-03-24 14:07:46 -07:00
Casey Carter 76d94b0c35
<filesystem>: Fix damage caused by redefinition of _Iter_value_t to iter_value_t in concepts mode (#631)
`iter_value_t` doesn't detour through `iterator_traits`, so it can be valid for non-iterator types. This breaks `_Is_Source2`, however, which expects `_Iter_value_t` to filter out non-iterator types.

Drive-by: rename `_Is_Source2` to `_Is_Source_impl` to be consistent with how we name trait helpers elsewhere.

Fixes DevCom-953628.
2020-03-24 13:16:22 -07:00
Curtis J Bezault 9915b312e7
Update dependencies for CI machines (#620) 2020-03-23 13:26:45 -07:00
Curtis J Bezault 6a25414c5a
Update devcrt to std in the README (#629) 2020-03-23 13:23:57 -07:00
Curtis J Bezault c5c422b1fc
Repoint the README to the changelog (#630) 2020-03-23 13:23:02 -07:00
Casey Carter 02a6ea8b62
Allow Clang10 in the STL (#622)
* Allow Clang10 in the STL

This PR includes changes necessary to allow (but not require) clang 10 in the STL. It also includes test changes to allow the tests to pass given new clang warnings for deprecated behaviors, and an update to the LLVM reference to get similar changes that have been applied upstream to libc++ tests.

Details:
* In `<compare>`, remove workarounds for LLVM-41991 in Clang 10 RC1 fixed in RC2.
* In `<concepts>`, remove `_SILENCE_CLANG_CONCEPTS_MESSAGE`.
* In `<queue>` and `<stack>`, befriend only corresponding specializations of operator templates.
* In `<system_error>`, fix the `__cpp_constexpr_dynamic_alloc` implementation of `_Immortalize_memcpy_image` (which we apparently didn't review at all).
* In `<experimental/filesystem>`, apply a fix equivalent to the resolution of LWG-3244.
* Update `P0220R1_optional` from upstream.
* In `P0595R2_is_constant_evaluated`, silence Clang's warning for using `is_constant_evaluated` in a manifestly constant-evaluated context.
* In `P0896R4_ranges_iterator_machinery`, fix bogus test cases that were expecting VSO-1008447, silence "unused variable" warnings, and avoid taking advantage of too-lenient MSVC comparison rewrite behavior.
* In `P0896R4_ranges_range_machinery`, silence "unused variable" warning.
* In `P0898R3_concepts`, Remove workaround for LLVM-44627 in Clang 10 RC1 fixed in RC2.
* In `VSO_0000000_type_traits` and `tr1/type_traits5`, silence volatile function parameter deprecation warnings.
* In `tr1/condition_variable`, `tr1/regex1`, and `tr1/regex3`, remove unnecessary copy assignment operators that were prompting Clang warnings about the implicitly definition of a copy constructor for such a class being deprecated.
* In `tr1/csetjmp`, silence volatile increment deprecation warnings.

Skip new libc++ tests:
* Various `span` tests that expect `const_iterator` (libc++ doesn't yet implement LWG-3320)
* tests for the implementation of P1135R6 "The C++ Synchronization Library" which we do not yet implement
2020-03-19 16:42:55 -07:00
Casey Carter 300e85650c
Remove STL workarounds for VSO-1006185 (#417)
* Remove STL workarounds for VSO-1006185

...which has been fixed for 16.6p1.

Fixes #416.
2020-03-17 22:23:37 -07:00
Billy O'Neal bf944d2e28
<filesystem> Treat ERROR_BAD_NETPATH as file not found. (#616)
Resolves GH-615 / DevCom-950424.

* Extract _Is_file_not_found to <xfilesystem_abi.h> as __std_is_file_not_found because we also need that in filesystem.cpp.
* Add ERROR_BAD_NETPATH to __std_is_file_not_found.
* Map ERROR_BAD_NETPATH to errc::no_such_file_or_directory.
* Change filesystem tests that look for file not exists behavior to also test bad network paths.
2020-03-17 18:29:50 -07:00
Stephan T. Lavavej e65b2aa6cd
Repair feature-test macros test. (#617)
* Now that the test uses `_HAS_CXX17` and `_HAS_CXX20`,
we need to include `<version>` at the very top.

* Fix damage to the `__cpp_rtti` test.

Additional cleanups:

* Capitalize "Clang" consistently.

* Sort prefixes like `__cpp_init_captures` before
`__cpp_initializer_lists`. This is lexicographic
('_' is less than '[a-z]') and matches the Standard's ordering.

* Remove `_M_CEE` comments for preprocessor directives. Earlier, we
decided that such systematic comments are unnecessarily noisy in this
test specifically, but these comments were simply missed.

* Remove inconsistent empty line.
2020-03-17 18:23:17 -07:00
Daniel Marshall 40bff7c881
<tests/std> Cleanup feature_test_macros/test.cpp (#603)
Reorder preprocessor chunks lexicographically and improve the error messages for incorrectly defined/undefined feature test macros.
2020-03-17 14:24:36 -07:00
Stephan T. Lavavej 4cce286cf4
Work around compiler bug in atomic. (#614) 2020-03-17 12:46:45 -07:00
Alex Guteniev 5f6b155001
Fix #608 : CMakeLists.txt: /O2 is not working (#610)
`VCLIBS_RELEASE_FLAGS` should be `VCLIBS_RELEASE_OPTIONS`.
2020-03-16 15:15:59 -07:00
pi1024e 32deb989fa
Simplify _FDscale in xfdscale.cpp (#609)
`psx` is `0`, so don't even bother checking.
2020-03-16 15:14:24 -07:00