[libcxx-commits] [libcxx] [libc++][test] Add `void` cast to a discarded call to `remquo` (PR #213849)

Nikolas Klauser via libcxx-commits libcxx-commits at lists.llvm.org
Tue Aug 4 07:09:51 PDT 2026


philnik777 wrote:

> > Not against this, but I do wonder whether we shouldn't go through `<cmath>` and add `[[nodiscard]]` throughout.
> 
> This seemed discussed in #171763. Perhaps we wanted Clang to make some diagnostics specific to `<cmath>` functions, but I'm not very sure.

I think the main thing was that we weren't very far into the `[[nodiscard]]` additions back then, and I wanted to go for lower hanging fruit first. We could probably revive that patch and land it in a very similar state. Though we might want to ask whether Clang wants to add `[[nodiscard]]` to most of them as well through the builtins to align with what libc++ would diagnose at that point. It'd be somewhat sub-optimal if only the double overload wasn't diagnosed.

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


More information about the libcxx-commits mailing list