]> granicus.if.org Git - clang/commit
Fix bug in ConditionBRVisitor where for C++ (and not C) we were not ignoring
authorTed Kremenek <kremenek@apple.com>
Fri, 7 Sep 2012 06:51:37 +0000 (06:51 +0000)
committerTed Kremenek <kremenek@apple.com>
Fri, 7 Sep 2012 06:51:37 +0000 (06:51 +0000)
commitc47dc1b9734ea9bebb281499d58d22c2647713a9
treec3b99282de2a677b2a315622a9565d45f752e849
parent6964b3f80ce1ba489e7e25e7cd58062699af9b0c
Fix bug in ConditionBRVisitor where for C++ (and not C) we were not ignoring
implicit pointer-to-boolean conversions in condition expressions.  This would
result in inconsistent diagnostic emission between C and C++.

A consequence of this is now ConditionBRVisitor and TrackConstraintBRVisitor may
emit redundant diagnostics, for example:

  "Assuming pointer value is null" (TrackConstraintBRVisitor)
  "Assuming 'p' is null" (ConditionBRVisitor)

We need to reconcile the two, and perhaps prefer one over the other in some
cases.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163372 91177308-0d34-0410-b5e6-96231b3b80d8
lib/StaticAnalyzer/Core/BugReporterVisitors.cpp
test/Analysis/diagnostics/deref-track-symbolic-region.cpp
test/Analysis/method-call-path-notes.cpp