fmayer wrote:

> The idea here makes sense to me and I don't mind if it lands without "NFC" in 
> the title, but I think enforcing this at compile time would be more robust. 
> Could we use `static_assert` with something like `llvm::BitWidth` and 
> supporting infrastructure from `llvm/include/ADT/BitmaskEnum.h`?

That would involve annotating all the enums with the largest value, and that's 
a bigger change, and also prone to error, so even if we did this the `assert` 
here is a good idea. We can do this later.

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

Reply via email to