================ @@ -2233,8 +2235,17 @@ ParseStatus RISCVAsmParser::parseOperandWithSpecifier(OperandVector &Operands) { SMLoc S = getLoc(); SMLoc E; - if (!parseOptionalToken(AsmToken::Percent) || - getLexer().getKind() != AsmToken::Identifier) + if (!parseOptionalToken(AsmToken::Percent)) + return Error(getLoc(), "expected '%' relocation specifier"); ---------------- lenary wrote:
Nit: this means the % is not optional, is there maybe a better way to write this? ```suggestion if (parseToken(AsmToken::Percent, "expected '%' relocation specifier")) return ParseStatus::Failure; ``` maybe? https://github.com/llvm/llvm-project/pull/132569 _______________________________________________ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits