summaryrefslogtreecommitdiffstats
path: root/clang/lib/StaticAnalyzer/Core/LoopUnrolling.cpp
diff options
context:
space:
mode:
authorArtem Dergachev <artem.dergachev@gmail.com>2019-09-11 20:54:21 +0000
committerArtem Dergachev <artem.dergachev@gmail.com>2019-09-11 20:54:21 +0000
commit6b85f8e99b38aed5bb4eeb4ca8d7ccdd5a1bf48c (patch)
tree6002dccf9b3bfb67b49127286df216d5947fd7e9 /clang/lib/StaticAnalyzer/Core/LoopUnrolling.cpp
parent8535b8ecf2913b1a53571624da04890174381afe (diff)
downloadbcm5719-llvm-6b85f8e99b38aed5bb4eeb4ca8d7ccdd5a1bf48c.tar.gz
bcm5719-llvm-6b85f8e99b38aed5bb4eeb4ca8d7ccdd5a1bf48c.zip
[analyzer] NFC: Move getStmt() and createEndOfPath() out of PathDiagnostic.
These static functions deal with ExplodedNodes which is something we don't want the PathDiagnostic interface to know anything about, as it's planned to be moved out of libStaticAnalyzerCore. Differential Revision: https://reviews.llvm.org/D67382 llvm-svn: 371659
Diffstat (limited to 'clang/lib/StaticAnalyzer/Core/LoopUnrolling.cpp')
-rw-r--r--clang/lib/StaticAnalyzer/Core/LoopUnrolling.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/clang/lib/StaticAnalyzer/Core/LoopUnrolling.cpp b/clang/lib/StaticAnalyzer/Core/LoopUnrolling.cpp
index 9838249ae82..1a09a521f11 100644
--- a/clang/lib/StaticAnalyzer/Core/LoopUnrolling.cpp
+++ b/clang/lib/StaticAnalyzer/Core/LoopUnrolling.cpp
@@ -165,7 +165,9 @@ static bool isPossiblyEscaped(const VarDecl *VD, ExplodedNode *N) {
return true;
while (!N->pred_empty()) {
- const Stmt *S = PathDiagnosticLocation::getStmt(N);
+ // FIXME: getStmtForDiagnostics() does nasty things in order to provide
+ // a valid statement for body farms, do we need this behavior here?
+ const Stmt *S = N->getStmtForDiagnostics();
if (!S) {
N = N->getFirstPred();
continue;
OpenPOWER on IntegriCloud