[patch] Improve AArch64 AsmParser diagnostics

Tim Northover t.p.northover at gmail.com
Thu Feb 7 12:06:18 PST 2013


Hi all,

The attached patch is my attempt to implement Jim's suggestion of
using DiagnosticTypes for accurate error reporting during assembly.

I've tried to avoid actively misleading messages when LLVM has guessed
the category you were trying for incorrectly, which accounts for the
vagueness of some of the messages.

There are lots of examples visible in the modified tests and I'd
welcome any feedback on the messages (particularly from outsiders).
Ignore caret position -- it's not checked by FileCheck and often
vestigial from a much earlier implementation of the backend.

I'm especially after a pithy way to say "expected uxtw with optional
integer in range [0,N], or lsl with compulsory integer in range
[0,N]". At the moment I'm relying on people knowing the shift amount
is not optional for "lsl".

Cheers.

Tim.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Make-use-of-DiagnosticType-to-provide-better-AArch64.patch
Type: application/octet-stream
Size: 167289 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20130207/731f8008/attachment.obj>


More information about the llvm-commits mailing list