Fix function pointer call detection for fast call selection

This commit is contained in:
drmortalwombat 2021-12-10 08:31:57 +01:00
parent a1fda2b957
commit 4d14cbe3a5

View File

@ -418,6 +418,12 @@ void GlobalAnalyzer::RegisterCall(Declaration* from, Declaration* to)
mCallingFunctions.Push(from);
from->mCalled.Push(to);
}
else if (to->mType == DT_TYPE_POINTER && to->mBase->mType == DT_TYPE_FUNCTION)
{
if (from->mCalled.Size() == 0)
mCallingFunctions.Push(from);
from->mCalled.Push(to->mBase);
}
}
}