[libc-commits] [clang] [mlir] [libunwind] [llvm] [libcxx] [lldb] [openmp] [polly] [lld] [libc] [compiler-rt] [clang-tools-extra] [flang] [libcxxabi] [libc++][numeric] P0543R3: Saturation arithmetic (PR #77967)
Mark de Wever via libc-commits
libc-commits at lists.llvm.org
Sun Jan 21 06:10:24 PST 2024
================
@@ -0,0 +1,172 @@
+//===----------------------------------------------------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+// UNSUPPORTED: c++03, c++11, c++14, c++17, c++20, c++23
+// The test uses "Placeholder variables with no name"
----------------
mordante wrote:
I'm strongly against disabling tests without good reasons. Basically we don't know whether the code works with clang-17. Instead we should do this
```
// TODO(LLVM-20) remove [[maybe_unused]] since all supported compilers support "Placeholder variables with no name"
[[maybe_unused]] std::same_as<IntegerT> decltype(auto) _ = std::add_sat(minVal, maxVal);
```
I tested this solution here https://godbolt.org/z/Y57obWo7s
https://github.com/llvm/llvm-project/pull/77967
More information about the libc-commits
mailing list