[llvm] a07e753 - LLParser: Fix failing nofpclass test

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Fri Feb 24 04:46:17 PST 2023


Author: Matt Arsenault
Date: 2023-02-24T08:46:11-04:00
New Revision: a07e75352e2a500ffd638ecca7c62ab5f20adc2c

URL: https://github.com/llvm/llvm-project/commit/a07e75352e2a500ffd638ecca7c62ab5f20adc2c
DIFF: https://github.com/llvm/llvm-project/commit/a07e75352e2a500ffd638ecca7c62ab5f20adc2c.diff

LOG: LLParser: Fix failing nofpclass test

Added: 
    

Modified: 
    llvm/lib/AsmParser/LLParser.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/AsmParser/LLParser.cpp b/llvm/lib/AsmParser/LLParser.cpp
index cb5c82bb5365..673a34ef7f18 100644
--- a/llvm/lib/AsmParser/LLParser.cpp
+++ b/llvm/lib/AsmParser/LLParser.cpp
@@ -2405,7 +2405,7 @@ unsigned LLParser::parseNoFPClassAttr() {
       // TODO: Disallow overlapping masks to avoid copy paste errors
     } else if (Mask == 0 && Lex.getKind() == lltok::APSInt &&
                !parseUInt64(Value)) {
-      if (Value == 0 || (Value & ~fcAllFlags) != 0) {
+      if (Value == 0 || (Value & ~static_cast<unsigned>(fcAllFlags)) != 0) {
         error(Lex.getLoc(), "invalid mask value for 'nofpclass'");
         return 0;
       }


        


More information about the llvm-commits mailing list