Skip to content

Commit cb532a3

Browse files
committed
[analyzer][NFC] Modernize iterator-based loop in LiveVariables::computeLiveness
1 parent 78fb8b0 commit cb532a3

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

clang/lib/Analysis/LiveVariables.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -556,9 +556,8 @@ LiveVariables::computeLiveness(AnalysisDeclContext &AC, bool killAtAssign) {
556556

557557
// Merge the values of all successor blocks.
558558
LivenessValues val;
559-
for (CFGBlock::const_succ_iterator it = block->succ_begin(),
560-
ei = block->succ_end(); it != ei; ++it) {
561-
if (const CFGBlock *succ = *it) {
559+
for (const CFGBlock *succ : block->succs()) {
560+
if (succ) {
562561
val = LV->merge(val, LV->blocksBeginToLiveness[succ]);
563562
}
564563
}

0 commit comments

Comments
 (0)