[llvm-branch-commits] [SPARC][IAS] Enable `ParseForAllFeatures` in `MatchOperandParserImpl` (PR #96021)
Sergei Barannikov via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Wed Jun 19 03:08:13 PDT 2024
================
@@ -11,7 +11,7 @@
! V9: unknown membar tag
membar #BadTag
- ! V8: instruction requires a CPU feature not currently enabled
+ ! V8: unexpected token
! V9: invalid membar mask number
membar -127
----------------
s-barannikov wrote:
There are many places where ParseStatus is not handled correctly.
In this case, it is
```
if (!parseOperand(Operands, Name).isSuccess()) {
SMLoc Loc = getLexer().getLoc();
return Error(Loc, "unexpected token");
}
```
It should propagate the error returned by parseOperand instead of issuing another one.
Something like:
```
ParseStatus R = parseOperand(Operands, Name).isSuccess();
if (R.isFailure())
return true;
if (R.isNoMatch())
return TokError( "unexpected token");
// success, proceed do the next operand
```
https://github.com/llvm/llvm-project/pull/96021
More information about the llvm-branch-commits
mailing list