[PATCH] D103096: [analyzer] Implement cast for ranges of symbolic integers
Gabor Marton via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Apr 29 01:31:57 PDT 2022
martong added a comment.
Giving it some more thought, the `SymCastMap = Map<SymbolRef, CastMap>` should be keyed as well with an equivalence class : `SymCastMap = Map<EquivalenceClass, CastMap>`. This is the only way to use the equivalence info correctly when we process the casts.
================
Comment at: clang/lib/StaticAnalyzer/Core/RangeConstraintManager.cpp:889-890
+REGISTER_MAP_FACTORY_WITH_PROGRAMSTATE(CastMap, uint32_t /*bitwidth*/, RangeSet)
+REGISTER_MAP_WITH_PROGRAMSTATE(SymCastMap, SymbolRef, CastMap)
+
----------------
NoQ wrote:
> These maps will need to be cleaned up when symbols become dead (as in `RangeConstraintManager::removeDeadBindings()`).
Yes, the same way as we clean up e.g. the `DisequalityMap`.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D103096/new/
https://reviews.llvm.org/D103096
More information about the cfe-commits
mailing list