Krzysztof Parzyszek
2013-Jul-29 16:24 UTC
[LLVMdev] [RFC] Add warning capabilities in LLVM.
On 7/24/2013 11:37 PM, Chris Lattner wrote:> > How about this: keep the jist of the current API, but drop the > "warning"- or "error"-ness of the API. Instead, the backend just > includes an enum value (plus string message for extra data). The > frontend makes the decision of how to render the diagnostic (or not, > dropping them is fine) along with how to map them onto warning/error or > whatever concepts they use.Also, having centralized handling of compiler messages has the advantage that it integrates with the mechanism of suppressing specific messages, or changing their severity. For example, a user may want to consider all warnings as errors, except a few specific examples, which would be suppressed. -K -- Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by The Linux Foundation
On Mon, Jul 29, 2013 at 9:24 AM, Krzysztof Parzyszek <kparzysz at codeaurora.org> wrote:> On 7/24/2013 11:37 PM, Chris Lattner wrote: >> >> >> How about this: keep the jist of the current API, but drop the >> "warning"- or "error"-ness of the API. Instead, the backend just >> includes an enum value (plus string message for extra data). The >> frontend makes the decision of how to render the diagnostic (or not, >> dropping them is fine) along with how to map them onto warning/error or >> whatever concepts they use. > > > Also, having centralized handling of compiler messages has the advantage > that it integrates with the mechanism of suppressing specific messages, or > changing their severity. For example, a user may want to consider all > warnings as errors, except a few specific examples, which would be > suppressed. >This is why the front end/caller into the backend should handle the actual diagnostic since it will have that knowledge and why we're working on it from that perspective. -eric
Krzysztof Parzyszek
2013-Jul-29 17:39 UTC
[LLVMdev] [RFC] Add warning capabilities in LLVM.
On 7/29/2013 12:34 PM, Eric Christopher wrote:> > This is why the front end/caller into the backend should handle the > actual diagnostic since it will have that knowledge and why we're > working on it from that perspective.I haven't read all of the posts in detail, but wasn't it already demonstrated as insufficient? What about messages about optimization hints---those generally cannot be detected by the front-end. -K -- Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by The Linux Foundation