[libcxx-commits] [libcxx] [libc++][ranges] Add sentinel `OtherConst` cases for `[[nodiscard]]` tests in `enumerate_view` (PR #209289)

Hristo Hristov via libcxx-commits libcxx-commits at lists.llvm.org
Fri Jul 17 09:56:33 PDT 2026


================
@@ -52,9 +63,12 @@ void test() {
   // expected-warning at +1 {{ignoring return value of function declared with 'nodiscard' attribute}}
   std::as_const(it)[2];
 
+  // expected-warning at +1 {{ignoring return value of function declared with 'nodiscard' attribute}}
----------------
Zingam wrote:

```suggestion
```

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


More information about the libcxx-commits mailing list