[clang] [NFC][analyzer] Refactor ExprEngine::processCallExit (PR #186182)

DonĂ¡t Nagy via cfe-commits cfe-commits at lists.llvm.org
Mon Mar 16 05:07:15 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);
----------------
NagyDonat wrote:

Thanks for the remark :smile: It was in my passive vocabulary, but didn't come to my mind when I wrote the commit messages.

https://github.com/llvm/llvm-project/pull/186182


More information about the cfe-commits mailing list