On Mon, Apr 2, 2012 at 12:28, Eric Christopher <[email protected]> wrote:
>
> On Apr 2, 2012, at 12:05 PM, Matt Beaumont-Gay <[email protected]> wrote:
>
>> Author: matthewbg
>> Date: Mon Apr  2 14:05:35 2012
>> New Revision: 153885
>>
>> URL: http://llvm.org/viewvc/llvm-project?rev=153885&view=rev
>> Log:
>> Silence -Wunused-variable in -Asserts build
>>
>> Modified:
>>    cfe/trunk/lib/Sema/SemaInit.cpp
>>
>> Modified: cfe/trunk/lib/Sema/SemaInit.cpp
>> URL: 
>> http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaInit.cpp?rev=153885&r1=153884&r2=153885&view=diff
>> ==============================================================================
>> --- cfe/trunk/lib/Sema/SemaInit.cpp (original)
>> +++ cfe/trunk/lib/Sema/SemaInit.cpp Mon Apr  2 14:05:35 2012
>> @@ -5745,6 +5745,7 @@
>>     OverloadCandidateSet::iterator Best;
>>     OverloadingResult Ovl
>>       = FailedCandidateSet.BestViableFunction(S, Kind.getLocation(), Best);
>> +    (void)Ovl;
>>     assert(Ovl == OR_Success && "Inconsistent overload resolution");
>
> Why not just fold the call into the assert?

It has side effects (assigning to Best).

_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to