[clang] [NFC][analyzer] Refactor ExprEngine::processCallExit (PR #186182)
Balázs Benics via cfe-commits
cfe-commits at lists.llvm.org
Fri Mar 13 04:08:41 PDT 2026
================
@@ -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
More information about the cfe-commits
mailing list