[all-commits] [llvm/llvm-project] cb4433: [libcxx][test] Silence nodiscard warnings for `std...

Stephan T. Lavavej via All-commits all-commits at lists.llvm.org
Tue Dec 10 04:23:31 PST 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: cb4433b677a06ecbb3112f39d24b28f19b0d2626
      https://github.com/llvm/llvm-project/commit/cb4433b677a06ecbb3112f39d24b28f19b0d2626
  Author: Stephan T. Lavavej <stl at nuwen.net>
  Date:   2024-12-10 (Tue, 10 Dec 2024)

  Changed paths:
    M libcxx/test/std/utilities/expected/expected.expected/monadic/and_then.pass.cpp
    M libcxx/test/std/utilities/expected/expected.expected/monadic/or_else.pass.cpp
    M libcxx/test/std/utilities/expected/expected.expected/monadic/transform.pass.cpp
    M libcxx/test/std/utilities/expected/expected.expected/monadic/transform_error.pass.cpp

  Log Message:
  -----------
  [libcxx][test] Silence nodiscard warnings for `std::expected` (#119174)

I'm exploring marking microsoft/STL's std::expected as [[nodiscard]],
which affects all functions returning std::expected, including its
own monadic member functions.

As usual, libc++'s test suite contains calls to these member functions
to make sure they compile, but it's discarding the returns. I'm adding
void casts to silence the [[nodiscard]] warnings without altering
what the test is covering.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list