fixed region inserter

This commit is contained in:
ALEXks
2025-07-27 08:20:36 +03:00
committed by Egor Mayorov
parent 27b7ea965e
commit c61e18a044

View File

@@ -1297,7 +1297,10 @@ static set<DIST::Array*>
{
declStat = SgStatement::getStatementByFileAndLine(decl.first, decl.second);
if (declStat == NULL) // check in inlcudes
{
{
if (!main->switchToFile())
printInternalError(convertFileName(__FILE__).c_str(), __LINE__);
for (auto st = main; st != main->lastNodeOfStmt() && !declStat; st = st->lexNext())
{
if (st->fileName() == decl.first && st->lineNumber() == decl.second)