[cfe-commits] r74205 - in /cfe/trunk: include/clang/Basic/DiagnosticSemaKinds.td lib/Sema/Sema.h lib/Sema/SemaDeclCXX.cpp lib/Sema/SemaExpr.cpp
Chris Lattner
clattner at apple.com
Tue Jun 30 09:48:32 PDT 2009
On Jun 30, 2009, at 9:39 AM, Fariborz Jahanian wrote:
>
> On Jun 29, 2009, at 11:00 PM, Chris Lattner wrote:
>
>>
>> You've been learning from Doug very well I see :). The problem
>> with this loop is that it evaluates ClassDecl->bases_end() every
>> time through the loop. In cases where the end iterator isn't
>> changing (the container isn't being mutated by the loop), it is
>> better to compute it once and refer to the pre-computed value.
>> Something like this:
>
> I did not learn this from Doug. I cut-and-pasted from his code :).
>
> Done in:
>
> http://llvm.org/viewvc/llvm-project?view=rev&revision=74533
Thanks Fariborz! If you notice other places, feel free to gently
nudge Doug about them :)
-Chris
More information about the cfe-commits
mailing list