[all-commits] [llvm/llvm-project] bdf7da: [libc++][test] Suppress MSVC warnings in std::expe...

Casey Carter via All-commits all-commits at lists.llvm.org
Fri Jan 6 10:02:53 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: bdf7da280f624c53e6184d0410041220a9b405a7
      https://github.com/llvm/llvm-project/commit/bdf7da280f624c53e6184d0410041220a9b405a7
  Author: Casey Carter <Casey at Carter.net>
  Date:   2023-01-06 (Fri, 06 Jan 2023)

  Changed paths:
    M libcxx/test/std/utilities/expected/expected.expected/ctor/ctor.inplace.pass.cpp
    M libcxx/test/std/utilities/expected/expected.expected/ctor/ctor.unexpect.pass.cpp
    M libcxx/test/std/utilities/expected/expected.expected/observers/value.pass.cpp
    M libcxx/test/std/utilities/expected/expected.expected/observers/value_or.pass.cpp
    M libcxx/test/std/utilities/expected/expected.void/ctor/ctor.unexpect.pass.cpp

  Log Message:
  -----------
  [libc++][test] Suppress MSVC warnings in std::expected tests

* initializing `short`s with `short`s instead of `int`s to avoid narrowing warnings
* Explicitly discard the result of `value` calls to avoid `[[nodiscard]]` warnings

Drive-by: `testException` from `value` test is duplicated in `value_or` test; remove the duplicate.

Differential Review: https://reviews.llvm.org/D141108




More information about the All-commits mailing list