[clang] [clang-tools-extra] [clang-tidy] bugprone-implicit-widening ignores unsigned consts (PR #101073)

Chris Warner via cfe-commits cfe-commits at lists.llvm.org
Fri Oct 11 08:43:44 PDT 2024


cwarner-8702 wrote:

Thanks @AaronBallman!

> I don't think we want constant expression evaluation to fail based on an input parameter.

It will already fail if the inputs as signed and expression overflows, so this seems like a case that all callers will have to deal with anyway.

> I think a better approach would be a new interface which doesn't return the APValue/APSInt directly, but instead returns something more like:

I can work with that!  Still open to other opinions or ideas too.


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


More information about the cfe-commits mailing list