[clang] [HLSL] Default and Relaxed Availability Diagnostics (PR #92704)
Damyan Pepper via cfe-commits
cfe-commits at lists.llvm.org
Wed May 29 10:26:07 PDT 2024
================
@@ -350,7 +350,7 @@ class DiagnoseHLSLAvailability
static_assert(HLSLShaderAttr::ShaderTypeMaxValue < 31,
"ShaderType is too big for this bitmap");
assert((((unsigned)1) << (unsigned)ShaderType) != 0 &&
----------------
damyanp wrote:
I wonder at this point if all we really need here is:
```
static_assert(sizeof(unsigned) >= 4); // if we want to be really paranoid
assert((unsigned)ShaderType < 31);
```
https://github.com/llvm/llvm-project/pull/92704
More information about the cfe-commits
mailing list