[clang] [sema] Improve -Wsign-compare (PR #65684)

Christopher Di Bella via cfe-commits cfe-commits at lists.llvm.org
Fri Oct 6 10:56:50 PDT 2023


=?utf-8?q?FĂ©lix?= Cloutier <fcloutier at apple.com>
Message-ID:
In-Reply-To: <llvm/llvm-project/pull/65684/clang at github.com>


https://github.com/cjdb commented:

Generally speaking, I'm in favour of this; thanks so much for identifying this problem!

When C++20 is available, we ought to suggest using `std:: is_lt` and friends instead. Possibly something like

```
note: C++20 provides 'std::is_lt(s, u)' for this use-case
```

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


More information about the cfe-commits mailing list