Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@CaseyCarter
Copy link
Contributor

@CaseyCarter CaseyCarter commented Apr 2, 2020

  • 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.
  • Update skips for two libc++ tests that changed suffixes from .sh.cpp to .pass.cpp.
  • Enable C5214-C5217 (which are off-by-default) in libc++ and std test suites

[This is a dual of internal MSVC-PR-239335.]

@CaseyCarter CaseyCarter requested a review from a team as a code owner April 2, 2020 16:44
@CaseyCarter CaseyCarter self-assigned this Apr 2, 2020
@CaseyCarter CaseyCarter added blocked Something is preventing work on this test Related to test code labels Apr 2, 2020
* `<optional>`: `optional::value_or` now returns `remove_cv_t<_Ty>` because it's silly to have a cv-qualified return type (Needs LWG issue).
* `<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.
* Update skips for two libc++ tests that changed suffixes from `.sh.cpp` to `.pass.cpp`.
* `std::any_cast` should never return a cv-qualified type
* Guard `_Implicitly_convert_to` against C5215
* Disable C5215 in `tr1/functional4`
@CaseyCarter CaseyCarter changed the title Test updates for MSVC implementation of P1152R4 "deprecating volatile" Changes to support the compiler portion of P1152R4 "deprecating volatile" Apr 2, 2020
// common header for functional?.cpp

#pragma warning(push)
#pragma warning(disable : 5215) // '%s' a function parameter with volatile qualified type is deprecated in C++20
Copy link
Contributor Author

@CaseyCarter CaseyCarter Apr 2, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The warning push/disable/pop is the only functional change to this header; I made a non-functional drive-by fix to some weird formatting on lines 135-220.


template <class _Ty2>
_NODISCARD constexpr _Ty value_or(_Ty2&& _Right) const& {
_NODISCARD constexpr remove_cv_t<_Ty> value_or(_Ty2&& _Right) const& {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've submitted an LWG issue (but not yet been assigned a number) to make the changes to both value_or overloads Standard.

@CaseyCarter CaseyCarter removed the blocked Something is preventing work on this label Apr 2, 2020
#pragma warning(disable : 4242) // 'identifier': conversion from '_From' to '_To', possible loss of data (/Wall)
#pragma warning(disable : 4244) // 'argument': conversion from '_From' to '_To', possible loss of data
#pragma warning(disable : 4365) // 'argument': conversion from '_From' to '_To', signed/unsigned mismatch (/Wall)
#pragma warning(disable : 5215) // '%s' a function parameter with a volatile qualified type is deprecated in C++20
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I find it somewhat interesting that you don't need to suppress Clang -Wdeprecated-volatile here. But if there are no warnings in our test suite, I'm happy.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We probably should; this will be in some future set of "suppress clang warnings that don't show up because system header" 🤷‍♂ .

@StephanTLavavej StephanTLavavej added the cxx20 C++20 feature label Apr 3, 2020
.... to enable libcxx to continue working after upstream changes to pass configuration to the filesystem tests which we do not run.
Copy link
Contributor

@cbezault cbezault left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm approving the test harness changes (which were trivial).

@CaseyCarter CaseyCarter removed the test Related to test code label Apr 3, 2020
@CaseyCarter CaseyCarter merged commit 2239101 into microsoft:master Apr 4, 2020
@CaseyCarter CaseyCarter deleted the depr branch April 4, 2020 01:20
@CaseyCarter CaseyCarter removed their assignment Jun 27, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cxx20 C++20 feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants