[PATCH] D45774: [analyzer] cover more cases where a Loc can be bound to constants
Gábor Horváth via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Sat May 5 01:01:40 PDT 2018
xazax.hun added inline comments.
================
Comment at: lib/StaticAnalyzer/Core/RegionStore.cpp:1642-1645
+ // Return unknown value if index is out of bounds.
+ if (i < 0 || i >= InitList->getNumInits()) {
+ return UnknownVal();
+ }
----------------
NoQ wrote:
> Hmm, we might as well want to return an `UndefinedVal()` when the index is out of bounds of the actual array. The size of the array can be retrieved from `VD`. Though if you decide to do that, please put it into a separate patch :)
+1 for the UndefVal patch :)
Repository:
rC Clang
https://reviews.llvm.org/D45774
More information about the cfe-commits
mailing list