[all-commits] [llvm/llvm-project] a88025: [analyzer] Consider array subscripts to be interes...

Valeriy Savchenko via All-commits all-commits at lists.llvm.org
Thu Apr 23 09:53:11 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: a88025672f89374bfa584e2179a557f44d86da11
      https://github.com/llvm/llvm-project/commit/a88025672f89374bfa584e2179a557f44d86da11
  Author: Valeriy Savchenko <vsavchenko at apple.com>
  Date:   2020-04-23 (Thu, 23 Apr 2020)

  Changed paths:
    M clang/lib/StaticAnalyzer/Core/ExplodedGraph.cpp
    A clang/test/Analysis/CheckThatArraySubsciptNodeIsNotCollected.cpp

  Log Message:
  -----------
  [analyzer] Consider array subscripts to be interesting lvalues.

Static analyzer has a mechanism of clearing redundant nodes when
analysis hits a certain threshold with a number of nodes in exploded
graph (default is 1000). It is similar to GC and aims removing nodes
not useful for analysis. Unfortunately nodes corresponding to array
subscript expressions (that actively participate in data propagation)
get removed during the cleanup. This might prevent the analyzer from
generating useful notes about where it thinks the data came from.

This fix is pretty much consistent with the way analysis works
already. Lvalue "interestingness" stands for the analyzer's
possibility of tracking values through them.

Differential Revision: https://reviews.llvm.org/D78638




More information about the All-commits mailing list