[PATCH] D24047: [MC] Defer asm errors to post-statement failure

Nirav Dave via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 30 13:57:35 PDT 2016


niravd added a comment.

In https://reviews.llvm.org/D24047#529392, @rnk wrote:

> Can you provide some motivating examples for how this improves diagnostic quality by eliminating duplicates? Clang's diagnostics aren't buffered, and our recovery is still acceptable.


The deferred errors is motivated by sharing in various error messages. For instance, most of the directive errors have a suffix of the form "in directive X". Deferring let's us cut down on all the strings and append a suffix once in ParseDirective (or similar place) or error.

Most of the error duplicate reduction happens not because of the buffering, but because of the improved checking of the return value from ParseInstruction or ParseDirective which causes us to continue to not run through the instruction and emit additional errors. The changes in the neon-diagnostic case is a good example: parsing failed, but we return success.


https://reviews.llvm.org/D24047





More information about the llvm-commits mailing list