[flang][NFC] Fix build-time warning (#149549)

Don't increment the LHS variable of an assignment that also uses that
variable on the RHS.
This commit is contained in:
Peter Klausler
2025-07-18 13:45:25 -07:00
committed by GitHub
parent 9e5b2fbe86
commit b6ea04a37b

View File

@@ -492,10 +492,9 @@ public:
// Uppercase the name of the main program, so that its symbol name
// would be unique from similarly named non-main-program symbols.
auto upperCaseCharBlock = [](const parser::CharBlock &cb) {
char *ch{const_cast<char *>(cb.begin())};
char *endCh{ch + cb.size()};
while (ch != endCh) {
*ch++ = parser::ToUpperCaseLetter(*ch);
auto ch{const_cast<char *>(cb.begin())};
for (char *endCh{ch + cb.size()}; ch != endCh; ++ch) {
*ch = parser::ToUpperCaseLetter(*ch);
}
};
const parser::CharBlock *progName{nullptr};