[clang] [NFCI][analyzer] Make CallEvent::getState protected (PR #162673)
Artem Dergachev via cfe-commits
cfe-commits at lists.llvm.org
Tue Oct 14 16:33:41 PDT 2025
=?utf-8?q?Donát?= Nagy <donat.nagy at ericsson.com>,
=?utf-8?q?Donát?= Nagy <donat.nagy at ericsson.com>,
=?utf-8?q?Donát?= Nagy <donat.nagy at ericsson.com>
Message-ID:
In-Reply-To: <llvm.org/llvm/llvm-project/pull/162673 at github.com>
================
@@ -211,6 +211,15 @@ class CallEvent {
getExtraInvalidatedValues(ValueList &Values,
RegionAndSymbolInvalidationTraits *ETraits) const {}
+ /// A state for looking up relevant Environment entries (arguments, return
+ /// value), dynamic type information and similar "stable" things.
+ /// WARNING: During the evaluation of a function call, several state
+ /// transitions happen, so this state can become partially obsolete!
+ ///
+ /// TODO: Instead of storing a complete state object in the CallEvent, only
+ /// store the relevant parts (argument/return SVals, dynamic type etc.).
----------------
haoNoQ wrote:
```suggestion
/// TODO: Instead of storing a complete state object in the CallEvent, only
/// store the relevant parts (such as argument/return SVals etc.) that aren't
/// allowed to become obsolete until the end of the call evaluation.
```
A slightly cleaner wording. And I think we shouldn't include the dynamic type there because the dynamic type probably *does* need to be re-loaded from the state instead.
https://github.com/llvm/llvm-project/pull/162673
More information about the cfe-commits
mailing list