r180982 - Attempt to un-break the gdb buildbot.

Eric Christopher echristo at gmail.com
Tue May 7 15:29:45 PDT 2013


Was more in the "incrementing and testing in an if statement" is
somewhat error prone. I mean, why not just increment and then check?

Also why no preincrements for the increments by 1?

-eric


On Tue, May 7, 2013 at 3:24 PM, Adrian Prantl <aprantl at apple.com> wrote:
> I agree about the commented out code, but what’s the story about the side effects? -- isEvaluatable is const, right?
>
> On May 7, 2013, at 3:19 PM, Eric Christopher <echristo at gmail.com> wrote:
>
>>> -    if (++NumStopPoints == 1)
>>> -      FirstStopPoint = Loc;
>>> +    //if (++NumStopPoints == 1)
>>> +      LastStopPoint = Loc;
>>>
>>
>> Eh? Commented out code? Also, side effects in an if conditional? Ew.
>>
>>> +  NumReturnExprs += 1;
>>>   if (RV == 0 || RV->isEvaluatable(getContext()))
>>> -    ++NumSimpleReturnExprs;
>>> +    NumSimpleReturnExprs += 1;
>>>
>>
>> Eh?
>>
>> -eric
>




More information about the cfe-commits mailing list