task-create-implicit-pass #30

Merged
Alexander_KS merged 20 commits from task-create-implicit-pass into master 2024-03-23 08:21:24 +00:00
Showing only changes of commit bdb74c8ae7 - Show all commits

View File

@@ -9,6 +9,7 @@
using std::vector;
using std::map;
using std::set;
using std::string;
static const char commonIntLetters[6] = { 'i', 'j', 'k', 'm', 'n', 'l' };
@@ -131,6 +132,9 @@ static map<char, SgType*> FunctionImplicitCheck(SgStatement* function, const map
for (auto& var : allVars)
{
if (string(var->identifier()) == function->symbol()->identifier())
continue;
vector<SgStatement*> _;
SgStatement* declaredInStatement = declaratedInStmt(var, &_, false);
if (declaredInStatement == NULL)
@@ -162,7 +166,11 @@ static map<char, SgType*> FunctionImplicitCheck(SgStatement* function, const map
st = st->lexNext();
}
function->insertStmtAfter(*new SgStatement(IMPL_DECL), *function);
auto implNone = new SgStatement(IMPL_DECL);
implNone->setlineNumber(function->lineNumber());
implNone->setFileName(function->fileName());
function->insertStmtAfter(*implNone, *function);
}
allVars.clear();