================ @@ -3073,7 +3073,7 @@ bool Sema::checkTargetVersionAttr(SourceLocation LiteralLoc, Decl *D, DuplicateAttr = true; HasPriority = true; int Digit; - if (AttrStr.getAsInteger(0, Digit)) + if (AttrStr.getAsInteger(0, Digit) || Digit < 0) ---------------- topperc wrote:
Use `unsigned` for Digit so that getAsInteger will automatically disable negative numbers? https://github.com/llvm/llvm-project/pull/112161 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits