[clang] [RISCV][FMV] Remove support for negative priority (PR #112161)

Craig Topper via cfe-commits cfe-commits at lists.llvm.org
Mon Oct 14 09:48:19 PDT 2024


================
@@ -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:

getAsUnsignedInteger?

https://github.com/llvm/llvm-project/pull/112161


More information about the cfe-commits mailing list