AsmParser: improve diagnostics for invalid variants
authorSaleem Abdulrasool <compnerd@compnerd.org>
Sun, 26 Jan 2014 22:29:43 +0000 (22:29 +0000)
committerSaleem Abdulrasool <compnerd@compnerd.org>
Sun, 26 Jan 2014 22:29:43 +0000 (22:29 +0000)
commit10096880c8fb08c58d4476577551397bc29f9508
tree04b1e483d06f9d92d43498376e33c9e695145bcc
parent425eb00894c3eb8df459e0b3ff5efce3dcf5bee9
AsmParser: improve diagnostics for invalid variants

An emitted diagnostic for an invalid relocation variant would place the caret on
the token following the relocation variant indicator or at the end of the line
if there was no following token.  This change corrects the placement of the
caret to point to the token.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@200159 91177308-0d34-0410-b5e6-96231b3b80d8
lib/MC/MCParser/AsmParser.cpp
test/MC/AsmParser/variant-diagnostics-2.s [new file with mode: 0644]
test/MC/AsmParser/variant-diagnostics.s [new file with mode: 0644]