[analyzer] Find better description for tracked symbolic values
authorValeriy Savchenko <vsavchenko@apple.com>
Wed, 21 Apr 2021 13:01:30 +0000 (16:01 +0300)
committerValeriy Savchenko <vsavchenko@apple.com>
Wed, 28 Apr 2021 15:37:38 +0000 (18:37 +0300)
commitab5823867c4aee7f3e02ddfaa217905c87471bf9
treeb08f2ff6ea964da6ba4e4b6d15e985eb14ecf28c
parente273918038a7aa300cb8e6afebd9714bf647eed0
[analyzer] Find better description for tracked symbolic values

When searching for stores and creating corresponding notes, the
analyzer is more specific about the target region of the store
as opposed to the stored value.  While this description was tweaked
for constant and undefined values, it lacked in the most general
case of symbolic values.

This patch tries to find a memory region, where this value is stored,
to use it as a better alias for the value.

rdar://76645710

Differential Revision: https://reviews.llvm.org/D101041
clang/lib/StaticAnalyzer/Core/BugReporterVisitors.cpp
clang/test/Analysis/Inputs/expected-plists/retain-release-path-notes.m.plist
clang/test/Analysis/diagnostics/deref-track-symbolic-region.cpp
clang/test/Analysis/osobject-retain-release.cpp
clang/test/Analysis/retain-release-path-notes.m
clang/test/Analysis/uninit-const.c
clang/test/Analysis/uninit-const.cpp