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

Aaron Ballman aaron at aaronballman.com
Thu Aug 29 13:37:11 PDT 2013


If that's the preferred way, then I'm happy to use it.  I forgot about
-Wcovered-switch-default.  Change incoming, thanks!

~Aaron

On Thu, Aug 29, 2013 at 4:33 PM, Reid Kleckner <rnk at google.com> wrote:
> 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
>
>



More information about the cfe-commits mailing list