]> granicus.if.org Git - clang/commit
[analyzer] trackNullOrUndefValue: always track through parentheses and casts.
authorArtem Dergachev <artem.dergachev@gmail.com>
Wed, 20 Dec 2017 01:03:22 +0000 (01:03 +0000)
committerArtem Dergachev <artem.dergachev@gmail.com>
Wed, 20 Dec 2017 01:03:22 +0000 (01:03 +0000)
commite955b4474aa27bd68bc1d3e90b7bef394afc9c85
tree3811b6bac057b99bfc5fa6c8f87aa54172abedbd
parent4c0ff5f25cab59ee047824f9aed05fcea9d7e1b2
[analyzer] trackNullOrUndefValue: always track through parentheses and casts.

When trying to figure out where a null or undefined value came from,
parentheses and cast expressions are either completely irrelevant, or,
in the case of lvalue-to-rvale cast, straightforwardly lead us in the right
direction when we remove them.

There is a regression that causes a certain diagnostic to appear twice in the
path-notes.cpp test (changed to FIXME). It would be addressed in the next
commit.

Differential revision: https://reviews.llvm.org/D41254

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@321133 91177308-0d34-0410-b5e6-96231b3b80d8
lib/StaticAnalyzer/Core/BugReporterVisitors.cpp
test/Analysis/inlining/false-positive-suppression.m
test/Analysis/inlining/inline-defensive-checks.c
test/Analysis/inlining/path-notes.cpp
test/Analysis/inlining/path-notes.m
test/Analysis/uninit-const.cpp