Skip to content

Commit

Permalink
Merge branch 'development' into f-BetterAsanSupport
Browse files Browse the repository at this point in the history
  • Loading branch information
fabianbs96 authored Nov 19, 2023
2 parents 099eda1 + 659cb8d commit b2f1ec5
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -182,13 +182,16 @@ auto IDETypeStateAnalysisBase::getCallToRetFlowFunction(
n_t CallSite, n_t /*RetSite*/, llvm::ArrayRef<f_t> Callees)
-> FlowFunctionPtrType {
const auto *CS = llvm::cast<llvm::CallBase>(CallSite);
bool DeclarationOnlyCalleeFound = false;
for (const auto *Callee : Callees) {
std::string DemangledFname = llvm::demangle(Callee->getName().str());
// Generate the return value of factory functions from zero value
if (isFactoryFunction(DemangledFname)) {
return this->generateFromZero(CS);
}

DeclarationOnlyCalleeFound |= Callee->isDeclaration();

/// XXX: Revisit this:

// Handle all functions that are not modeld with special semantics.
Expand All @@ -209,6 +212,10 @@ auto IDETypeStateAnalysisBase::getCallToRetFlowFunction(
}
}
}
if (!DeclarationOnlyCalleeFound) {
return killFlowIf(
[](d_t Source) { return llvm::isa<llvm::Constant>(Source); });
}
return identityFlow();
}

Expand Down

0 comments on commit b2f1ec5

Please sign in to comment.