Endilll wrote:

>>    @erichkeane I guess you'd be pretty happy if our enums were declared the 
>> following way:

>Not really? That doesn't gain us the 'we must change where this is stored' 
>situation like a preferred_type attribute would/could. We MIGHT be able to get 
>away with a comment on top of that with a list of places that needs to ALSO be 
>changed, but we end up missing similar comments today anyway.

I meant `unsigned _BitInt(N)` underlying type to complement `preferred_type`'s 
check that a bit-field is wide enough. Otherwise such a check will have to 
incorporate heuristics to prevent false-positives for cases like the following: 
https://github.com/llvm/llvm-project/blob/180eae1f1e5a08595ed2278d93f01fb321284649/clang/include/clang/AST/DeclarationName.h#L174-L185
One might argue that this particular case might be resolved by transition to 
`PointerIntPair`, which is true. It's just the only case I was able to find. I 
have a recollection of an enum that ends with `Size` enumerator, possibly 
TableGen'ed, but I can't find it.

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