[cfe-commits] r73336 - in /cfe/trunk/lib/Sema: Sema.cpp Sema.h SemaTemplateDeduction.cpp

Chris Lattner clattner at apple.com
Sun Jun 14 22:29:19 PDT 2009


On Jun 14, 2009, at 1:02 AM, Douglas Gregor wrote:
> URL: http://llvm.org/viewvc/llvm-project?rev=73336&view=rev
> Log:
> Introduce a SFINAE "trap" that keeps track of the number of errors
> that were suppressed due to SFINAE. By checking whether any errors
> occur at the end of template argument deduction, we avoid the
> possibility of suppressing an error (due to SFINAE) and then
> recovering so well that template argument deduction never detects that
> there was a problem. Thanks to Eli for the push in this direction.

Cool, I think I see where this is going, one comment though:

> +      bool Fatal = false;
> +      switch (Diags.getDiagnosticLevel(DiagID)) {

I'm pretty sure that SFINAE shouldn't change behavior based on things  
like -Werror etc.  You probably want to check the class of the  
diagnostic, not the level (which is post-mapping).

-Chris




More information about the cfe-commits mailing list