[PATCH] D81254: [analyzer] Produce symbolic values for C-array elements

Denys Petrov via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Jun 9 03:49:05 PDT 2020


ASDenysPetrov marked an inline comment as done.
ASDenysPetrov added inline comments.


================
Comment at: clang/lib/StaticAnalyzer/Core/RegionStore.cpp:1709
   if (!O.getRegion())
-    return UnknownVal();
+    return svalBuilder.getRegionValueSymbolVal(R);
 
----------------
NoQ wrote:
> As soon as contents of the array change during analysis, this becomes incorrect: we cannot keep denoting a new value with the same old symbol.
I've updated the patch, adding more tests with the case you mentioned. Please, look at them, especially at functions  last four functions. Is this your case? If so, then I tested them and they passed successfully. And if I'm wrong, please, explain what I missed more detaily.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D81254/new/

https://reviews.llvm.org/D81254





More information about the cfe-commits mailing list