[PATCH] D30923: Warn on enum assignment to bitfields that can't fit all values

Reid Kleckner via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Mar 14 09:51:22 PDT 2017

rnk added a comment.

In https://reviews.llvm.org/D30923#700626, @hfinkel wrote:

> In https://reviews.llvm.org/D30923#700620, @thakis wrote:
> > Maybe it should have some "to suppress the warning, do X" fixit?
> I think we should at least include how many bits the field should have to fix the problem (pointing to the relevant field definition certainly seems helpful).

Agreed, I was just hacking that together. :)

Do you think it's worth indicating that the error can be suppressed with an explicit cast, or is that wasted space?


More information about the cfe-commits mailing list