<div dir="ltr">This also fixed a truckload of stuff on <a href="http://sli.dy.fi/~sliedes/clang-triage/triage_report.xhtml#changes">http://sli.dy.fi/~sliedes/clang-triage/triage_report.xhtml#changes</a> (Run #1241).</div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Jan 29, 2015 at 9:01 PM, David Majnemer <span dir="ltr"><<a href="mailto:david.majnemer@gmail.com" target="_blank">david.majnemer@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Author: majnemer<br>
Date: Thu Jan 29 23:01:23 2015<br>
New Revision: 227556<br>
<br>
URL: <a href="http://llvm.org/viewvc/llvm-project?rev=227556&view=rev" target="_blank">http://llvm.org/viewvc/llvm-project?rev=227556&view=rev</a><br>
Log:<br>
Sema: Disable template instantiation once a fatal error is raised<br>
<br>
Fatal errors disable all further diagnostics.  Continuing to permit<br>
template instantiation does nothing but make it take longer for clang to<br>
finish with the TU.<br>
<br>
Instead, halt all further instantiation.<br>
<br>
Fixed in PR22396.<br>
<br>
Modified:<br>
    cfe/trunk/lib/Sema/SemaTemplateInstantiate.cpp<br>
<br>
Modified: cfe/trunk/lib/Sema/SemaTemplateInstantiate.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaTemplateInstantiate.cpp?rev=227556&r1=227555&r2=227556&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaTemplateInstantiate.cpp?rev=227556&r1=227555&r2=227556&view=diff</a><br>
==============================================================================<br>
--- cfe/trunk/lib/Sema/SemaTemplateInstantiate.cpp (original)<br>
+++ cfe/trunk/lib/Sema/SemaTemplateInstantiate.cpp Thu Jan 29 23:01:23 2015<br>
@@ -207,6 +207,12 @@ void Sema::InstantiatingTemplate::Initia<br>
     sema::TemplateDeductionInfo *DeductionInfo) {<br>
   SavedInNonInstantiationSFINAEContext =<br>
       SemaRef.InNonInstantiationSFINAEContext;<br>
+  // Don't allow further instantiation if a fatal error has occcured.  Any<br>
+  // diagnostics we might have raised will not be visible.<br>
+  if (SemaRef.Diags.hasFatalErrorOccurred()) {<br>
+    Invalid = true;<br>
+    return;<br>
+  }<br>
   Invalid = CheckInstantiationDepth(PointOfInstantiation, InstantiationRange);<br>
   if (!Invalid) {<br>
     ActiveTemplateInstantiation Inst;<br>
<br>
<br>
_______________________________________________<br>
cfe-commits mailing list<br>
<a href="mailto:cfe-commits@cs.uiuc.edu">cfe-commits@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits</a><br>
</blockquote></div><br></div>