<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">I wonder if it should continue to report all fatal errors instead of just file-not-found. Also, my patch sort of circumvents the 20 error fatal cutoff. Maybe that’s okay.<div class=""><br class=""></div><div class="">Jason</div><div class=""><br class=""></div><div class=""><br class=""><div><blockquote type="cite" class=""><div class="">On Jan 4, 2015, at 2:19 AM, Richard Smith <<a href="mailto:richard@metafoo.co.uk" class="">richard@metafoo.co.uk</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><div class="gmail_extra"><div class="gmail_quote">On Sat, Jan 3, 2015 at 11:15 PM, Jason Haslam<span class="Apple-converted-space"> </span><span dir="ltr" class=""><<a href="mailto:jason.haslam@gmail.com" target="_blank" class="">jason.haslam@gmail.com</a>></span><span class="Apple-converted-space"> </span>wrote:<br class=""><blockquote class="gmail_quote" style="margin: 0px 0px 0px 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex;">This is important to us for the same reasons. In our case we only care about reporting additional file-not-found errors.</blockquote><div class=""><br class=""></div><div class="">Olivier, is this also the case for you, or do you want to see other diagnostics after a missing #include?</div><div class=""> </div><blockquote class="gmail_quote" style="margin: 0px 0px 0px 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex;">The others usually become too noisy. I haven’t found any existing option to control this. We have a local patch to continue reporting file-not-found errors after a fatal error (may be slightly out of date):<br class=""><br class="">--- a/lib/Basic/DiagnosticIDs.cpp<br class="">+++ b/lib/Basic/DiagnosticIDs.cpp<br class="">@@ -618,7 +618,7 @@ bool DiagnosticIDs::ProcessDiag(DiagnosticsEngine &Diag) const {<br class=""><br class=""> // If a fatal error has already been emitted, silence all subsequent<br class=""> // diagnostics.<br class="">- if (Diag.FatalErrorOccurred) {<br class="">+ if (Diag.FatalErrorOccurred && DiagID != diag::err_pp_file_not_found) {<br class=""> if (DiagLevel >= DiagnosticIDs::Error &&<br class=""> Diag.Client->IncludeInDiagnosticCounts()) {<br class=""> ++Diag.NumErrors;<br class=""><br class="">I would love to see an option to control this behavior added to the mainline.</blockquote><div class=""><br class=""></div><div class="">I don't think we need an option for this; it seems reasonable to always report missing #includes, even if we've already hit a fatal error, because a missing include is very unlikely to be caused by a prior missing include (they may have a common cause, but that's OK).</div><div class=""><br class=""></div><blockquote class="gmail_quote" style="margin: 0px 0px 0px 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex;">Are there already other flags meant specifically for IDE integration? Maybe this could piggyback on one of them or do something similar?<br class=""><br class="">Jason<br class=""><div class=""><div class="h5"><br class=""><br class="">> On Dec 31, 2014, at 4:13 AM, Olivier J. G. <<a href="mailto:olivier.jg@gmail.com" class="">olivier.jg@gmail.com</a>> wrote:<br class="">><br class="">> Hello,<br class="">><br class="">> We've run into a problem using libclang for cpp support in KDevelop: once an #included file is not found, a fatal error is generated which disables all further diagnostics.<br class="">><br class="">> In the context of KDevelop, it is quite important that this be downgraded to a non-fatal error so that further missing includes and issues can be marked in the IDE. It's further desirable that the IDE support is still helpful in the absence of a missing but unimportant #include.<br class="">><br class="">> I've found no way to do this with compiler flags; err_pp_file_not_found has no category so -Wno-fatal-errors=foo can't help (not clear if that's the correct method even if there was a category).<br class="">><br class="">> Is there a way to do this that I missed seeing? Can this diagnostic be re-mapped from fatal to error?<br class="">><br class="">> If there's no existing way to do this, could some interface or compiler flag be added so that err_pp_file_not_found_not_fatal is used instead? What would be the correct place/way to configure this?<br class="">><br class="">> Thanks,<br class="">><br class="">> -Olivier JG<br class=""></div></div>> _______________________________________________<br class="">> cfe-dev mailing list<br class="">><span class="Apple-converted-space"> </span><a href="mailto:cfe-dev@cs.uiuc.edu" class="">cfe-dev@cs.uiuc.edu</a><br class="">><span class="Apple-converted-space"> </span><a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev" target="_blank" class="">http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev</a><br class=""><br class=""><br class="">_______________________________________________<br class="">cfe-dev mailing list<br class=""><a href="mailto:cfe-dev@cs.uiuc.edu" class="">cfe-dev@cs.uiuc.edu</a><br class=""><a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev" target="_blank" class="">http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev</a></blockquote></div></div></div></div></blockquote></div><br class=""></div></body></html>