4 Commits

Author SHA1 Message Date
Egor Mayorov
297a20b2e6 Analyze program block by block & reorder operators only in basic blocks 2026-03-03 15:07:21 +03:00
Egor Mayorov
c40afd5ad6 use rd 2026-03-03 15:07:21 +03:00
ALEXks
80a1fecb1c fixed getStatementByFileAndLine 2026-03-03 09:18:15 +03:00
ALEXks
2db6bf4bdf fixed recovering of includes 2026-03-03 09:00:42 +03:00
4 changed files with 927 additions and 600 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -577,10 +577,20 @@ string removeIncludeStatsAndUnparse(SgFile *file, const char *fileName, const ch
for (auto& incl : inclByPos.second)
inlcude += (renameIncludes ? renameInclude(incl) : incl);
if (st->comments())
st->setComments((inlcude + st->comments()).c_str());
//check inserted operators
SgStatement* toInsert = st;
do {
auto lexPrev = toInsert->lexPrev();
if (lexPrev && lexPrev->variant() > 0 && lexPrev->lineNumber() < 0)
toInsert = lexPrev;
else
st->addComment(inlcude.c_str());
break;
} while (true);
if (toInsert->comments())
toInsert->setComments((inlcude + toInsert->comments()).c_str());
else
toInsert->addComment(inlcude.c_str());
}
}

View File

@@ -1,3 +1,3 @@
#pragma once
#define VERSION_SPF "2465"
#define VERSION_SPF "2467"