[analyzer] [NFC] Remove most usages of getEndPath
authorGeorge Karpenkov <ekarpenkov@apple.com>
Tue, 12 Jun 2018 20:50:44 +0000 (20:50 +0000)
committerGeorge Karpenkov <ekarpenkov@apple.com>
Tue, 12 Jun 2018 20:50:44 +0000 (20:50 +0000)
commit5ec0a2613f89f1cccc43f61b3f2987e20d47bed8
treee1645b623e0f6c9b2b5acc2c3efed7797e801816
parent8b4b82eed471f65c5cfdda12e6e4f7966fe9024e
[analyzer] [NFC] Remove most usages of getEndPath

getEndPath is a problematic API, because it's not clear when it's called
(hint: not always at the end of the path), it crashes at runtime with
more than one non-nullptr returning implementation, and diagnostics
internal depend on it being called at some exact place.

However, most visitors don't actually need that: all they want is a
function consistently called after all nodes are traversed, to perform
finalization and to decide whether invalidation is needed.

Differential Revision: https://reviews.llvm.org/D48042

llvm-svn: 334540
clang/include/clang/StaticAnalyzer/Core/BugReporter/BugReporterVisitors.h
clang/lib/StaticAnalyzer/Core/BugReporter.cpp
clang/lib/StaticAnalyzer/Core/BugReporterVisitors.cpp