[cfe-commits] r153885 - /cfe/trunk/lib/Sema/SemaInit.cpp

Sebastian Redl sebastian.redl at getdesigned.at
Tue Apr 3 08:11:58 PDT 2012


On 02.04.2012, at 21:28, Eric Christopher wrote:

> 
> On Apr 2, 2012, at 12:05 PM, Matt Beaumont-Gay <matthewbg at google.com> 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?

Because 'Best' is an out parameter that is actually used.

Sebastian



More information about the cfe-commits mailing list