r189605 - Silencing a rather spurious warning from MSVC 11 about not all control paths returning a value (hint: they do).

Reid Kleckner rnk at google.com
Thu Aug 29 13:33:55 PDT 2013


Won't this change trigger clang -Wcovered-switch-default?  Isn't the
preferred way to put llvm_unreachable() after the switch?


On Thu, Aug 29, 2013 at 1:25 PM, Aaron Ballman <aaron at aaronballman.com>wrote:

> Author: aaronballman
> Date: Thu Aug 29 15:25:14 2013
> New Revision: 189605
>
> URL: http://llvm.org/viewvc/llvm-project?rev=189605&view=rev
> Log:
> Silencing a rather spurious warning from MSVC 11 about not all control
> paths returning a value (hint: they do).
>
> Modified:
>     cfe/trunk/lib/Analysis/Consumed.cpp
>
> Modified: cfe/trunk/lib/Analysis/Consumed.cpp
> URL:
> http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Analysis/Consumed.cpp?rev=189605&r1=189604&r2=189605&view=diff
>
> ==============================================================================
> --- cfe/trunk/lib/Analysis/Consumed.cpp (original)
> +++ cfe/trunk/lib/Analysis/Consumed.cpp Thu Aug 29 15:25:14 2013
> @@ -74,6 +74,7 @@ static bool isKnownState(ConsumedState S
>      return true;
>    case CS_None:
>    case CS_Unknown:
> +  default:
>      return false;
>    }
>  }
>
>
> _______________________________________________
> cfe-commits mailing list
> cfe-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20130829/ac334015/attachment.html>


More information about the cfe-commits mailing list