Endilll wrote:

> when does someone have an enum value that they don't intend to ever be in the 
> enum
In my previous comments 
(https://github.com/llvm/llvm-project/pull/69104#issuecomment-1771167758, 
https://github.com/llvm/llvm-project/pull/69104#issuecomment-1771204043) I 
provided an example of `StoredNameKind` enum that has enumerators 0 through 8 
(9 total, 4 bits to store), but we store it in a bit-fields of width 3, because 
the last enumerator is there to count other enumerators, and is used for offset 
purposes. If we apply `-Wbitfield-enum-conversion` to it as-is, we get a 
false-positive: https://godbolt.org/z/4xPs6qPTY.

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