<div dir="ltr"><div>Hi all,</div><div><br></div><div>This came up in a recent review. There is currently no documented style for how to write error messages. For example, should they start with a capital letter or end in a full stop? Consequently, there's quite a bit of inconsistency in our diagnostics throughout the code base.</div><div><br></div><div>clang typically emits error messages with no leading capital letter and no trailing full stop. For example:</div><div><br></div><div>C:\>clang<br></div><div>"clang: error: no input files"</div><div><br></div><div>I have suggested this approach be followed in many different reviews, primarily in the LLVM equivalents of the GNU binutils that I typically work on. I'd like to propose that this be followed more widely too, and documented in the coding standards as such. Note, I am not proposing changing existing error messages as part of this. Do people agree with this proposal? If not, what would you prefer to see?<br></div><div><br></div><div>As well as "regular" errors you'll see in typical usage, there are 3 other kinds of errors that are widely used, with the following output styles:</div><div><br></div><div>Assertion failures:</div><div><br></div><div>Assertion failed: false && "this is the message", file <filepath><br></div><div><br></div><div>llvm_unreachable failures:</div><div><br></div><div>this is the message<br>UNREACHABLE executed at <filepath></div><div><br></div><div>report_fatal_error failures:</div><div><br></div><div>LLVM ERROR: this is the message</div><div><br></div><div>Looking at the existing output, and how they are used, I think llvm_unreachable and assertions do not need standardising, since they are purely for internal usage, whilst report_fatal_error should be standardised to the same as other normal errors (i.e. lower-case first letter, trailing full stop).</div><div><br></div><div>What do people think?</div><div><br></div><div>James<br></div></div>