Skip to content

Commit fa52cbb

Browse files
committed
cleanup code
1 parent 32b5f71 commit fa52cbb

File tree

1 file changed

+9
-11
lines changed

1 file changed

+9
-11
lines changed

flang/lib/Lower/OpenACC.cpp

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2145,25 +2145,23 @@ static void processDoLoopBounds(
21452145
Fortran::parser::FindSourceLocation(outerDoConstruct)));
21462146
} else {
21472147
// Safely locate the next inner DoConstruct within this eval.
2148-
const Fortran::parser::DoConstruct *doCons = nullptr;
2148+
const Fortran::parser::DoConstruct *innerDo = nullptr;
21492149
if (crtEval && crtEval->hasNestedEvaluations()) {
2150-
for (Fortran::lower::pft::Evaluation &child :
2151-
crtEval->getNestedEvaluations()) {
2152-
if (auto *cand = child.getIf<Fortran::parser::DoConstruct>()) {
2153-
doCons = cand;
2150+
for (Fortran::lower::pft::Evaluation &child : crtEval->getNestedEvaluations()) {
2151+
if (auto *stmt = child.getIf<Fortran::parser::DoConstruct>()) {
2152+
innerDo = stmt;
21542153
// Prepare to descend for the next iteration
21552154
crtEval = &child;
21562155
break;
21572156
}
21582157
}
21592158
}
2160-
if (!doCons) {
2161-
// No deeper loop; stop collecting collapsed bounds.
2162-
break;
2163-
}
2164-
loopControl = &*doCons->GetLoopControl();
2159+
if (!innerDo)
2160+
break; // No deeper loop; stop collecting collapsed bounds.
2161+
2162+
loopControl = &*innerDo->GetLoopControl();
21652163
locs.push_back(converter.genLocation(
2166-
Fortran::parser::FindSourceLocation(*doCons)));
2164+
Fortran::parser::FindSourceLocation(*innerDo)));
21672165
}
21682166

21692167
const Fortran::parser::LoopControl::Bounds *bounds =

0 commit comments

Comments
 (0)