<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;"><div>Hi,</div><div><br></div><div>I would like to start a discussion about error/warning reporting in LLVM and how we can extend the current mechanism to take advantage of clang capabilities.</div><div><br></div><div><br></div><div>** Motivation **</div><div><br></div><div>Currently LLVM provides a way to report error either directly (print to stderr) or by using a user defined error handler. For instance, in inline asm parsing, we can specify the diagnostic handler to report the errors in clang.</div><div><br></div><div>The basic idea would be to be able to do that for warnings too (and for other kind of errors?).</div><div>A motivating example can be found with the following link where we want LLVM to be able to warn on the stack size to help developing kernels:</div><a href="http://llvm.org/bugs/show_bug.cgi?id=4072">http://llvm.org/bugs/show_bug.cgi?id=4072</a><div><br></div><div>By adding this capability, we would be able to have access to all the nice features clang provides with warnings:</div><div>- Promote it to an error.</div><div>- Ignore it.</div><div><br></div><div><br></div><div>** Challenge **</div><div><br></div><div>To be able to take advantage of clang framework for warning/error reporting, warnings have to be associated with warning groups.</div><div>Thus, we need a way for the backend to specify a front-end warning type.</div><div><br></div><div>The challenge is, AFAICT (which is not much, I admit), that front-end warning types are statically handled using tablegen representation.</div><div><br></div><div><br></div><div>** Advices Needed **</div><div><br></div><div>1. Decide whether or not we want such capabilities (if we do not we may just add sporadically the support for a new warning/group of warning/error).</div><div>2. Come up with a plan to implement that (assuming we want it).</div><div><br></div><div><br></div><div>Thanks for the feedbacks.</div><div><br></div><div>Cheers,</div><div><br><div apple-content-edited="true">
<div style="color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">-Quentin</div>
</div>
<br></div></body></html>