fixed implicit

This commit is contained in:
ALEXks
2025-02-13 16:37:24 +03:00
parent 7e17c62bbb
commit 83a303cc30
3 changed files with 18 additions and 2 deletions

View File

@@ -51,12 +51,15 @@ static void FindAllVars(SgExpression* expr, set<SgSymbol*>& allVars, set<SgSymbo
{ {
auto s = expr->symbol(); auto s = expr->symbol();
const string ident(s->identifier()); const string ident(s->identifier());
const int s_var = s->variant();
if (var == FUNC_CALL /*(s->attributes() & EXTERNAL_BIT)*/) if (var == FUNC_CALL /*(s->attributes() & EXTERNAL_BIT)*/)
{ {
if (!IS_BY_USE(s) && ident.find("::") == string::npos /* && s->scope() == scope*/) if (!IS_BY_USE(s) && ident.find("::") == string::npos /* && s->scope() == scope*/)
allVars.insert(s); allVars.insert(s);
} }
else else if (s_var != CONSTRUCT_NAME ||
s_var == VARIABLE_NAME)
{ {
if (!IS_BY_USE(s) && ident.find("::") == string::npos && s->scope() == scope) if (!IS_BY_USE(s) && ident.find("::") == string::npos && s->scope() == scope)
allVars.insert(s); allVars.insert(s);

View File

@@ -0,0 +1,13 @@
#pragma once
void getModulesAndFunctions(SgFile* file, std::vector<SgStatement*>& modulesAndFunctions);
void findModulesInFile(SgFile* file, std::vector<SgStatement*>& modules);
SgSymbol* getFromModule(const std::map<std::string, std::set<SgSymbol*>>& byUse, SgSymbol* orig, bool processAsModule = false);
std::map<std::string, std::set<std::string>> createMapOfModuleUses(SgFile* file);
void fillModuleUse(SgFile* file, std::map<std::string, std::set<std::string>>& moduleUses, std::map<std::string, std::string>& moduleDecls);
void filterModuleUse(std::map<std::string, std::set<std::string>>& moduleUses, std::map<std::string, std::string>& moduleDecls);
void fillUsedModulesInFunction(SgStatement* st, std::vector<SgStatement*>& useStats);
std::string getNameByUse(SgStatement* place, const std::string& varName, const std::string& locName);
void fillUseStatement(SgStatement* st, std::set<std::string>& useMod, std::map<std::string, std::vector<std::pair<SgSymbol*, SgSymbol*>>>& modByUse, std::map<std::string, std::vector<std::pair<SgSymbol*, SgSymbol*>>>& modByUseOnly);
void fixUseOnlyStmt(SgFile* file, const std::vector<ParallelRegion*>& regs);
std::map<std::string, std::set<SgSymbol*>> moduleRefsByUseInFunction(SgStatement* stIn);

View File

@@ -1,3 +1,3 @@
#pragma once #pragma once
#define VERSION_SPF "2389" #define VERSION_SPF "2390"