This commit is contained in:
2026-03-26 16:01:14 +03:00
committed by ALEXks
parent 97e60e16be
commit 8632dfbf31
5 changed files with 94 additions and 23 deletions

View File

@@ -287,7 +287,6 @@ void ArrayConstantPropagation(SgProject& project)
if (!file)
continue;
const int funcNum = file->numberOfFunctions();
for (int i = 0; i < funcNum; ++i)
{
@@ -327,7 +326,10 @@ void ArrayConstantPropagation(SgProject& project)
if (scope)
funcStarts.insert(scope);
}
for (const auto& st: funcStarts)
for (const auto& st : funcStarts)
{
SgFile::switchToFile(st->fileName());
InsertCommonAndDeclsForFunction(st, variablesToAdd);
}
}
}