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

Matt Beaumont-Gay matthewbg at google.com
Mon Apr 2 13:29:09 PDT 2012


On Mon, Apr 2, 2012 at 12:28, Eric Christopher <echristo at apple.com> 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?

It has side effects (assigning to Best).




More information about the cfe-commits mailing list