[llvm-dev] [RFC] Preferred error/note style across non-clang tools, e.g. tablegen

Chris Lattner via llvm-dev llvm-dev at lists.llvm.org
Sun Jul 26 14:41:55 PDT 2020



> On Jul 24, 2020, at 1:08 PM, Jonathan Roelofs <jonathan_roelofs at apple.com> wrote:
> 
>>> I may be missing something, but we'll discuss the patch in its review.  However, unless an error results in a barrage of errors because something crucial was broken, I'd rather see all error messages.  Sometimes, building is tedious (e.g., batch system), so I'd rather be aware of all issues and fix them before trying another build.
>> 
>> Maybe I missed something here: I thought the proposal was to add additional notes to existing error messages, with the goal of clarifying the output and improving the user experience.
>> 
>> I didn’t think the intention was to turn error messages into notes.  Did I get that wrong?
> 
> The patch transforms a few `PrintFatalError()`s into `PrintError(); PrintFatalNote();`s.
> 
> Evandro is asking me to turn it instead into `PrintError(); PrintNote();`, which I’m not confident is okay: this might invalidate some invariant and lead to the tool crashing later. I’d rather not lump that in with my changes.

Oh I see, right, I’d separate those out as different things.  It is valuable to emit more than one error at a time, but that is separate from making individual errors higher quality, and definitely has the potential of introducing crashers if invariants are broken.

-Chris

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20200726/7b60a539/attachment-0001.html>


More information about the llvm-dev mailing list