1 Commits

Author SHA1 Message Date
ALEXks
bdb74c8ae7 fixed function names 2024-03-23 11:17:46 +03:00

View File

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