[PATCH] D111654: [analyzer] Retrieve a value from list initialization of multi-dimensional array declaration.
Denys Petrov via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Oct 26 09:12:40 PDT 2021
ASDenysPetrov added inline comments.
================
Comment at: clang/lib/StaticAnalyzer/Core/RegionStore.cpp:1706-1743
+ // Check offsets for being out of bounds.
// C++20 [expr.add] 7.6.6.4 (excerpt):
// If P points to an array element i of an array object x with n
// elements, where i < 0 or i > n, the behavior is undefined.
// Dereferencing is not allowed on the "one past the last
// element", when i == n.
// Example:
----------------
martong wrote:
> Perhaps this hunk could be in an individual implementation function?
There are two //returns// inside the loop. That would not such easy to do a separate function for this.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D111654/new/
https://reviews.llvm.org/D111654
More information about the cfe-commits
mailing list