mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-02-12 18:33:22 +00:00
Improve ARM assembly parser diagnostic for unexpected tokens.
Consider: mov r8, r11 fred Previously, we issued the not very informative: x.s:6:1: error: unexpected token in argument list ^ Now we generate: x.s:5:14: error: unexpected token in argument list mov r8, r11 fred ^ git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141380 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
a48ad13339
commit
186ffac4d3
@ -3617,8 +3617,9 @@ bool ARMAsmParser::ParseInstruction(StringRef Name, SMLoc NameLoc,
|
||||
}
|
||||
|
||||
if (getLexer().isNot(AsmToken::EndOfStatement)) {
|
||||
SMLoc Loc = getLexer().getLoc();
|
||||
Parser.EatToEndOfStatement();
|
||||
return TokError("unexpected token in argument list");
|
||||
return Error(Loc, "unexpected token in argument list");
|
||||
}
|
||||
|
||||
Parser.Lex(); // Consume the EndOfStatement
|
||||
|
Loading…
x
Reference in New Issue
Block a user