[clang] [Clang] Consider preferred_type in bitfield warnings (#116760) (PR #116785)

Oliver Hunt via cfe-commits cfe-commits at lists.llvm.org
Thu Apr 24 11:49:14 PDT 2025


ojhunt wrote:

> This change makes Clang produce warnings when building Clang itself; warnings looking like this:
> 

That was the entire point of this warning. As far as I know clang+llvm is the only project to use preferred_type (instead of just using enum typed bitfields), but as a result of that had functionally disabled bitfield size warnings for all of the enum fields in the project.

The FPEvalMethod warning should have been addressed in https://github.com/llvm/llvm-project/pull/136515, by making the relevant bitfields large enough to actually store the enum, are you still seeing these failures?


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


More information about the cfe-commits mailing list