]> granicus.if.org Git - clang/commit
[analyzer] Allow tracknullOrUndef look through the ternary operator even when conditi...
authorAnna Zaks <ganna@apple.com>
Wed, 3 Apr 2013 21:34:12 +0000 (21:34 +0000)
committerAnna Zaks <ganna@apple.com>
Wed, 3 Apr 2013 21:34:12 +0000 (21:34 +0000)
commit702077f14100f2d7acdb12ad49b53e64efc37d72
treea4d0fd2f6b293f82f5d85a8de3ba59964e75c6f1
parent4ad33d0f971da3eba5041f13fbd034f80ea9bfeb
[analyzer] Allow tracknullOrUndef look through the ternary operator even when condition is unknown

Improvement of r178684 and r178685.

Jordan has pointed out that I should not rely on the value of the condition to know which expression branch
has been taken. It will not work in cases the branch condition is an unknown value (ex: we do not track the constraints for floats).
The better way of doing this would be to find out if the current node is the right or left successor of the node
that has the ternary operator as a terminator (which is how this is done in other places, like ConditionBRVisitor).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178701 91177308-0d34-0410-b5e6-96231b3b80d8
lib/StaticAnalyzer/Core/BugReporterVisitors.cpp
test/Analysis/inlining/false-positive-suppression.c