[clang] Unknown array lvalue element (PR #133381)

Balazs Benics via cfe-commits cfe-commits at lists.llvm.org
Fri Mar 28 10:19:26 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))
----------------
steakhal wrote:

+1

https://github.com/llvm/llvm-project/pull/133381


More information about the cfe-commits mailing list