[clang-tools-extra] [clang-tidy] Improved readability redundant casting with enums (PR #111424)

Julian Schmidt via cfe-commits cfe-commits at lists.llvm.org
Sat Nov 16 00:16:04 PST 2024


=?utf-8?q?Félix-Antoine?= Constantin,
=?utf-8?q?Félix-Antoine?= Constantin,
=?utf-8?q?Félix-Antoine?= Constantin
Message-ID:
In-Reply-To: <llvm.org/llvm/llvm-project/pull/111424 at github.com>


5chmidti wrote:

> Is it really a false negative? In another word, does `enum E1 : char {};` mean `E1` is the type alias of `char`?
> IMO is not. for me a new option is more suitable for this case.

I think it is a false negative in the sense that the cast is redundant, but it is a type conversion, so maybe the default should not warn on explicit casts from enums, and make the loss of explicit Information opt-in.

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


More information about the cfe-commits mailing list