================
@@ -8285,10 +8285,20 @@ static void HandleVectorSizeAttr(QualType &CurType,
const ParsedAttr &Attr,
Expr *SizeExpr = Attr.getArgAsExpr(0);
QualType T = S.BuildVectorType(CurType, SizeExpr, Attr.getLoc());
- if (!T.isNull())
- CurType = T;
- else
+ if (T.isNull()) {
+ Attr.setInvalid();
+ return;
+ }
+
+ std::optional<llvm::APSInt> VecSize =
----------------
AaronBallman wrote:
I think this logic should live in `BuildVectorType()` instead, near where we
emit `err_attribute_invalid_size`.
https://github.com/llvm/llvm-project/pull/166055
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits