[cfe-commits] r143790 - /cfe/trunk/lib/Analysis/LiveVariables.cpp

Anna Zaks ganna at apple.com
Sat Nov 5 08:11:52 PDT 2011


David, 

A refined version of this was committed  in r143797.

On Nov 5, 2011, at 7:50 AM, David Blaikie wrote:

>>  I feel silly that I left out the "continue" statements.
> 
> I feel even more silly - I still don't see why the "continue"
> statements are necessary, could you explain (or Anna) explain it? If
> any of those blocks fire, they're the only thing in the loop so
> putting "continue" at the end of each seems like it wouldn't change
> the behavior at all. Or is this meant as some kind of future-proofing
> in case someone adds some non-conditional code to the end of the
> block? (pretty hard to speculate on whether such future use would want
> the continues or not, though, it seems to me)

That's the reason.

> If you are going to have the continues in, then you could remove all
> the elses, right?
> 
> if (...) {
>  ...
>  continue;
> }
> if (...) {
>  ...
>  continue;
> }
> ...
> break;




More information about the cfe-commits mailing list