Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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