[clang] [NFCI][analyzer] Improve computeObjectUnderConstruction (PR #186186)

DonĂ¡t Nagy via cfe-commits cfe-commits at lists.llvm.org
Tue Mar 17 05:37:49 PDT 2026


================
@@ -562,8 +562,12 @@ std::optional<SVal> CallEvent::getReturnValueUnderConstruction() const {
 
   EvalCallOptions CallOpts;
   ExprEngine &Engine = getState()->getStateManager().getOwningEngine();
+  // FIXME: This code assumes that the _current_ location context and block is
+  // the location and block where this `CallExpr` is called. For a more stable
+  // solution `Engine.getNumVisitedCurrent()` should be replaced with a call to
+  // `Engine.getNumVisited(<CallerLCtx>, <CallerBlock>)`.
----------------
NagyDonat wrote:

OK, then I revert this additional commit (https://github.com/llvm/llvm-project/pull/186186/commits/a17505ee08717c354fb327731b15ec43466237f9) on this PR, merge the rest (because it was already reviewed and accepted) and open a new PR for https://github.com/llvm/llvm-project/pull/186186/commits/a17505ee08717c354fb327731b15ec43466237f9. 

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


More information about the cfe-commits mailing list