[clang] [nfc][analyzer] Add MemSpace trait to program state (PR #123003)
DonĂ¡t Nagy via cfe-commits
cfe-commits at lists.llvm.org
Tue Jan 28 07:19:45 PST 2025
================
@@ -1544,7 +1544,7 @@ SVal RegionStoreManager::getBinding(RegionBindingsConstRef B, Loc L, QualType T)
// The location does not have a bound value. This means that it has
// the value it had upon its creation and/or entry to the analyzed
// function/method. These are either symbolic values or 'undefined'.
- if (R->hasStackNonParametersStorage()) {
+ if (R->hasRawStackNonParametersStorage()) {
----------------
NagyDonat wrote:
**Remark:** This is another example (in addition to e.g. the ArrayBoundV2 lower bound check) where it seems to be important to distinguish the "raw" (inherent) memory space and the "acquired" memory space: this logic applies a default to "real" local stack variables, that should not apply to initially unknown regions where we later conclude that they're on the stack (but perhaps don't bind anything as their content).
No action expected in this commit, but this could be another reason for keeping the separate "inherent" memory space field in the future.
https://github.com/llvm/llvm-project/pull/123003
More information about the cfe-commits
mailing list