================
@@ -262,6 +262,10 @@ void ExprEngine::processCallExit(ExplodedNode *CEBNode) {
// Find the last statement in the function and the corresponding basic block.
auto [LastSt, Blk] = getLastStmt(CEBNode);
+ const CFGBlock *PrePurgeBlock =
+ isa_and_nonnull<ReturnStmt>(LastSt) ? Blk : &CEBNode->getCFG().getExit();
+ setCurrLocationContextAndBlock(CalleeCtx, PrePurgeBlock);
----------------
steakhal wrote:
FYI "moving out things to a larger scope" is called hoisting.
https://github.com/llvm/llvm-project/pull/186182
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits