[clang] [Clang] [analyzer] replace Stmt* with ConstCFGElementRef in SymbolConjured (PR #128251)
via cfe-commits
cfe-commits at lists.llvm.org
Fri Feb 21 17:15:27 PST 2025
================
@@ -1376,8 +1379,8 @@ StoreRef RegionStoreManager::invalidateRegions(
}
RegionBindingsRef B = getRegionBindings(store);
- InvalidateRegionsWorker W(*this, StateMgr, B, S, Count, LCtx, IS, ITraits,
- Invalidated, GlobalsFilter);
+ InvalidateRegionsWorker W(*this, StateMgr, B, Call->getCFGElementRef(), Count,
----------------
isuckatcs wrote:
Here we initially passed `const Stmt *S` to the worker, so we should pass the `CFGElementRef` of `const Stmt *S` and not what we obtain from the call, I guess.
As for that, you can pass it down from the only callsite of this function, as you have access to the engine.
```c++
ProgramStateRef ProgramState::invalidateRegions(
...
ExprEngine &Eng = Mgr.getOwningEngine()
...
const StoreRef &NewStore = Mgr.StoreMgr->invalidateRegions(
getStore(), Values, Eng.getCFGElementRef(), Count, LCtx, Call, *IS,
*ITraits, &TopLevelInvalidated, &Invalidated);
...
}
```
I don't know if that's a reference that we want here, but with trial and error we will see.
https://github.com/llvm/llvm-project/pull/128251
More information about the cfe-commits
mailing list