[clang] [analyzer] Unknown array lvalue element in Store (PR #133381)
via cfe-commits
cfe-commits at lists.llvm.org
Sun Mar 30 22:32:53 PDT 2025
================
@@ -511,13 +511,9 @@ SVal StoreManager::getLValueElement(QualType elementType, NonLoc Offset,
// Only allow non-integer offsets if the base region has no offset itself.
// FIXME: This is a somewhat arbitrary restriction. We should be using
// SValBuilder here to add the two offsets without checking their types.
- if (!isa<nonloc::ConcreteInt>(Offset)) {
- if (isa<ElementRegion>(BaseRegion->StripCasts()))
- return UnknownVal();
-
+ if (!isa<nonloc::ConcreteInt>(Offset))
----------------
T-Gruber wrote:
Thank you for the explanations. Am I right in assuming that we can leave it as it is for this PR?
https://github.com/llvm/llvm-project/pull/133381
More information about the cfe-commits
mailing list