================
@@ -2312,6 +2312,18 @@ QualType Sema::BuildArrayType(QualType T,
ArraySizeModifier ASM,
return T;
}
+bool CheckBitIntElementType(Sema &S, SourceLocation AttrLoc,
+ const BitIntType *BIT, bool ForMatrixType = false)
{
+ // Only support _BitInt elements with byte-sized power of 2 NumBits.
+ unsigned NumBits = BIT->getNumBits();
+ if (!llvm::isPowerOf2_32(NumBits) || NumBits < 8) {
+ S.Diag(AttrLoc, diag::err_attribute_invalid_bitint_vector_type)
+ << ForMatrixType << (NumBits < 8);
+ return true;
----------------
Fznamznon wrote:
AFAIK you can do
```suggestion
return S.Diag(AttrLoc, diag::err_attribute_invalid_bitint_vector_type)
<< ForMatrixType << (NumBits < 8);
```
https://github.com/llvm/llvm-project/pull/117487
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits