Fix global analyzer not following recursive structs
This commit is contained in:
parent
0f182d2d6d
commit
433270f90f
|
@ -516,6 +516,18 @@ void GlobalAnalyzer::AnalyzeGlobalVariable(Declaration* dec)
|
|||
}
|
||||
}
|
||||
|
||||
void GlobalAnalyzer::AnalyzeInit(Declaration* mdec)
|
||||
{
|
||||
while (mdec)
|
||||
{
|
||||
if (mdec->mValue)
|
||||
RegisterProc(Analyze(mdec->mValue, mdec, false));
|
||||
else if (mdec->mParams)
|
||||
AnalyzeInit(mdec->mParams);
|
||||
mdec = mdec->mNext;
|
||||
}
|
||||
}
|
||||
|
||||
Declaration * GlobalAnalyzer::Analyze(Expression* exp, Declaration* procDec, bool lhs)
|
||||
{
|
||||
Declaration* ldec, * rdec;
|
||||
|
@ -532,13 +544,7 @@ Declaration * GlobalAnalyzer::Analyze(Expression* exp, Declaration* procDec, boo
|
|||
AnalyzeProcedure(exp->mDecValue->mValue, exp->mDecValue);
|
||||
else if (exp->mDecValue->mType == DT_CONST_STRUCT)
|
||||
{
|
||||
Declaration* mdec = exp->mDecValue->mParams;
|
||||
while (mdec)
|
||||
{
|
||||
if (mdec->mValue)
|
||||
RegisterProc(Analyze(mdec->mValue, mdec, false));
|
||||
mdec = mdec->mNext;
|
||||
}
|
||||
AnalyzeInit(exp->mDecValue->mParams);
|
||||
}
|
||||
else if (exp->mDecValue->mType == DT_CONST_POINTER)
|
||||
{
|
||||
|
|
|
@ -30,6 +30,8 @@ protected:
|
|||
GrowingArray<Declaration*> mCalledFunctions, mCallingFunctions, mVariableFunctions, mFunctions;
|
||||
GrowingArray<Declaration*> mGlobalVariables;
|
||||
|
||||
void AnalyzeInit(Declaration* mdec);
|
||||
|
||||
Declaration* Analyze(Expression* exp, Declaration* procDec, bool lhs);
|
||||
|
||||
bool MarkCycle(Declaration* rootDec, Declaration* procDec);
|
||||
|
|
|
@ -74,7 +74,7 @@ int main2(int argc, const char** argv)
|
|||
|
||||
#else
|
||||
strcpy(strProductName, "oscar64");
|
||||
strcpy(strProductVersion, "1.20.207");
|
||||
strcpy(strProductVersion, "1.20.208");
|
||||
|
||||
#ifdef __APPLE__
|
||||
uint32_t length = sizeof(basePath);
|
||||
|
|
|
@ -25,8 +25,8 @@ LANGUAGE LANG_ENGLISH, SUBLANG_NEUTRAL
|
|||
//
|
||||
|
||||
VS_VERSION_INFO VERSIONINFO
|
||||
FILEVERSION 1,20,207,0
|
||||
PRODUCTVERSION 1,20,207,0
|
||||
FILEVERSION 1,20,208,0
|
||||
PRODUCTVERSION 1,20,208,0
|
||||
FILEFLAGSMASK 0x3fL
|
||||
#ifdef _DEBUG
|
||||
FILEFLAGS 0x1L
|
||||
|
@ -43,12 +43,12 @@ BEGIN
|
|||
BEGIN
|
||||
VALUE "CompanyName", "oscar64"
|
||||
VALUE "FileDescription", "oscar64 compiler"
|
||||
VALUE "FileVersion", "1.20.207.0"
|
||||
VALUE "FileVersion", "1.20.208.0"
|
||||
VALUE "InternalName", "oscar64.exe"
|
||||
VALUE "LegalCopyright", "Copyright (C) 2021"
|
||||
VALUE "OriginalFilename", "oscar64.exe"
|
||||
VALUE "ProductName", "oscar64"
|
||||
VALUE "ProductVersion", "1.20.207.0"
|
||||
VALUE "ProductVersion", "1.20.208.0"
|
||||
END
|
||||
END
|
||||
BLOCK "VarFileInfo"
|
||||
|
|
|
@ -5233,15 +5233,15 @@
|
|||
{
|
||||
"Name" = "8:Microsoft Visual Studio"
|
||||
"ProductName" = "8:oscar64"
|
||||
"ProductCode" = "8:{FEED3AD1-30EE-4FD2-954E-A54FFC19B2ED}"
|
||||
"PackageCode" = "8:{88265E1D-B2B8-4C78-A582-11E0B0CF7FB7}"
|
||||
"ProductCode" = "8:{30CBD281-E43B-4539-A830-C8EA3D9ECEEC}"
|
||||
"PackageCode" = "8:{B24DA444-F39A-4974-97A1-BF31AB02202C}"
|
||||
"UpgradeCode" = "8:{9AB61EFF-ACAC-4079-9950-8D96615CD4EF}"
|
||||
"AspNetVersion" = "8:2.0.50727.0"
|
||||
"RestartWWWService" = "11:FALSE"
|
||||
"RemovePreviousVersions" = "11:TRUE"
|
||||
"DetectNewerInstalledVersion" = "11:TRUE"
|
||||
"InstallAllUsers" = "11:FALSE"
|
||||
"ProductVersion" = "8:1.20.207"
|
||||
"ProductVersion" = "8:1.20.208"
|
||||
"Manufacturer" = "8:oscar64"
|
||||
"ARPHELPTELEPHONE" = "8:"
|
||||
"ARPHELPLINK" = "8:"
|
||||
|
|
Loading…
Reference in New Issue