diff --git a/lib/PhasarLLVM/DataFlow/IfdsIde/Problems/IDETypeStateAnalysis.cpp b/lib/PhasarLLVM/DataFlow/IfdsIde/Problems/IDETypeStateAnalysis.cpp index 3f20b5d97..8b2dfdcf9 100644 --- a/lib/PhasarLLVM/DataFlow/IfdsIde/Problems/IDETypeStateAnalysis.cpp +++ b/lib/PhasarLLVM/DataFlow/IfdsIde/Problems/IDETypeStateAnalysis.cpp @@ -182,6 +182,7 @@ auto IDETypeStateAnalysisBase::getCallToRetFlowFunction( n_t CallSite, n_t /*RetSite*/, llvm::ArrayRef Callees) -> FlowFunctionPtrType { const auto *CS = llvm::cast(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 @@ -189,6 +190,8 @@ auto IDETypeStateAnalysisBase::getCallToRetFlowFunction( return this->generateFromZero(CS); } + DeclarationOnlyCalleeFound |= Callee->isDeclaration(); + /// XXX: Revisit this: // Handle all functions that are not modeld with special semantics. @@ -209,6 +212,10 @@ auto IDETypeStateAnalysisBase::getCallToRetFlowFunction( } } } + if (!DeclarationOnlyCalleeFound) { + return killFlowIf( + [](d_t Source) { return llvm::isa(Source); }); + } return identityFlow(); }