]> granicus.if.org Git - clang/commit
[analyzer] Always allow BugReporterVisitors to see the bug path.
authorJordan Rose <jordan_rose@apple.com>
Sat, 22 Sep 2012 01:24:56 +0000 (01:24 +0000)
committerJordan Rose <jordan_rose@apple.com>
Sat, 22 Sep 2012 01:24:56 +0000 (01:24 +0000)
commitd632d6fc606f0be438c3b6fe5c43f1b3f5db98b1
tree5170a66196fdf5afb7ba1a8322cd8f05e8ed280b
parent8347d3d45e6f128bba19821f0d2f54cadd4d49bb
[analyzer] Always allow BugReporterVisitors to see the bug path.

Before, PathDiagnosticConsumers that did not support actual path output
would (sensibly) cause the generation of the full path to be skipped.
However, BugReporterVisitors may want to see the path in order to mark a
BugReport as invalid.

Now, even for a path generation scheme of 'None' we will still create a
trimmed graph and walk backwards through the bug path, doing no work other
than passing the nodes to the BugReporterVisitors. This isn't cheap, but
it's necessary to properly do suppression when the first path consumer does
not support path notes.

In the future, we should try only generating the path and visitor-provided
path notes once, or at least only creating the trimmed graph once.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@164447 91177308-0d34-0410-b5e6-96231b3b80d8
lib/StaticAnalyzer/Core/BugReporter.cpp