philnik777 wrote:

> One thing I REALLY hate about our pattern of using bitfields for enums, is 
> that it becomes pretty trivial to add an entry to an enum and forget to 
> increase the size of the bitfield. I think such a attribute could cause a 
> diagnostic of `bitfield says it holds an ENUM type, but can't store all the 
> values`, which would be INCREDIBLY valuable (not that I'm pushing that this 
> patch IMPLEMENT that, but more that I'm saying such a name COULD do that, and 
> probably should as well).
> 
> So in conclusion, I don't mind the name, but also prefer something more 
> general.

Couldn't we add a warning for that in general? Seems like a pretty useful one 
to me.

https://github.com/llvm/llvm-project/pull/69104
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to