]> granicus.if.org Git - clang/commit
[analyzer] Track indices of arrays
authorKristof Umann <dkszelethus@gmail.com>
Sun, 16 Jun 2019 14:52:56 +0000 (14:52 +0000)
committerKristof Umann <dkszelethus@gmail.com>
Sun, 16 Jun 2019 14:52:56 +0000 (14:52 +0000)
commit79bbbd4575947357e5a6dc31ac413927f8922ea8
tree1de71733787a9f54d9e172b829d7f5739ccee8e9
parent5a03555f77944a966f6a549b5370c8842cf6eb5a
[analyzer] Track indices of arrays

Often times, when an ArraySubscriptExpr was reported as null or
undefined, the bug report was difficult to understand, because the
analyzer explained why arr[i] has that value, but didn't realize that in
fact i's value is very important as well. This patch fixes this by
tracking the indices of arrays.

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@363510 91177308-0d34-0410-b5e6-96231b3b80d8
lib/StaticAnalyzer/Core/BugReporterVisitors.cpp
test/Analysis/diagnostics/track_subexpressions.cpp