[clang] [clang][NFC] Mark CWG2943 as implemented and add a test (PR #195192)

Vlad Serebrennikov via cfe-commits cfe-commits at lists.llvm.org
Fri May 1 00:26:43 PDT 2026


================
@@ -174,4 +174,21 @@ constexpr U _ = nondeterministic(true);
 #endif
 } // namespace cwg2922
 
+namespace cwg2943 { // cwg2943: 3.9
+#if __cplusplus >= 201703L
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wignored-attributes"
+[[nodiscard]] void f();
+#pragma clang diagnostic pop
+template <class T> [[nodiscard]] T g();
+
+void h() {
+  f();
----------------
Endilll wrote:

`(void)f()'` case is missing.

https://github.com/llvm/llvm-project/pull/195192


More information about the cfe-commits mailing list