TrackConstraintBRVisitor and ConditionBRVisitor can emit similar
authorTed Kremenek <kremenek@apple.com>
Thu, 25 Oct 2012 22:07:10 +0000 (22:07 +0000)
committerTed Kremenek <kremenek@apple.com>
Thu, 25 Oct 2012 22:07:10 +0000 (22:07 +0000)
commita5958869f6bcd57e8691e6c4fb4086a96c17e419
treed6a8d4bd01756396b48b21e4094d6266405b86e7
parent10483565246ef0841c738fc086c91373821c7ce5
TrackConstraintBRVisitor and ConditionBRVisitor can emit similar
path notes for cases where a value may be assumed to be null, etc.
Instead of having redundant diagnostics, do a pass over the generated
PathDiagnostic pieces and remove notes from TrackConstraintBRVisitor
that are already covered by ConditionBRVisitor, whose notes tend
to be better.

Fixes <rdar://problem/12252783>

llvm-svn: 166728
13 files changed:
clang/include/clang/StaticAnalyzer/Core/BugReporter/BugReporterVisitor.h
clang/include/clang/StaticAnalyzer/Core/BugReporter/PathDiagnostic.h
clang/lib/StaticAnalyzer/Core/BugReporter.cpp
clang/lib/StaticAnalyzer/Core/BugReporterVisitors.cpp
clang/test/Analysis/conditional-operator-path-notes.c
clang/test/Analysis/diagnostics/deref-track-symbolic-region.cpp
clang/test/Analysis/inline-plist.c
clang/test/Analysis/inlining/path-notes.c
clang/test/Analysis/method-call-path-notes.cpp
clang/test/Analysis/null-deref-path-notes.m
clang/test/Analysis/plist-output-alternate.m
clang/test/Analysis/plist-output.m
clang/test/Analysis/retain-release-path-notes.m