diff options
author | Ted Kremenek <kremenek@apple.com> | 2008-04-23 23:04:32 +0000 |
---|---|---|
committer | Ted Kremenek <kremenek@apple.com> | 2008-04-23 23:04:32 +0000 |
commit | 6aaca9cbf2e3f3c976e0c685078a22420c416f5e (patch) | |
tree | e4cff9cb90cac174bde90f6336f353d06fdb829b /lib/Analysis/BugReporter.cpp | |
parent | a43a1eb6e7c773b79898541794bf819601719493 (diff) |
Fix minor regression in bug report generation.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50195 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis/BugReporter.cpp')
-rw-r--r-- | lib/Analysis/BugReporter.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/Analysis/BugReporter.cpp b/lib/Analysis/BugReporter.cpp index d137cff3e7..33633736b1 100644 --- a/lib/Analysis/BugReporter.cpp +++ b/lib/Analysis/BugReporter.cpp @@ -165,19 +165,20 @@ MakeReportGraph(ExplodedGraph<ValueState>* G, ExplodedNode<ValueState>* N) { GTrim->getContext()); - ExplodedNode<ValueState>* Last = 0; + ExplodedNode<ValueState> *Last = 0, *First = 0; while (N) { ExplodedNode<ValueState>* NewN = G->getNode(N->getLocation(), N->getState()); + if (!First) First = NewN; if (Last) Last->addPredecessor(NewN); Last = NewN; N = N->pred_empty() ? 0 : *(N->pred_begin()); } - return std::make_pair(G, Last); + return std::make_pair(G, First); } void BugReporter::GeneratePathDiagnostic(PathDiagnostic& PD, |