Fix minor regression in bug report generation.
llvm-svn: 50195
This commit is contained in:
parent
f26bc55b9a
commit
05e6267466
|
@ -165,19 +165,20 @@ MakeReportGraph(ExplodedGraph<ValueState>* G, ExplodedNode<ValueState>* N) {
|
||||||
GTrim->getContext());
|
GTrim->getContext());
|
||||||
|
|
||||||
|
|
||||||
ExplodedNode<ValueState>* Last = 0;
|
ExplodedNode<ValueState> *Last = 0, *First = 0;
|
||||||
|
|
||||||
while (N) {
|
while (N) {
|
||||||
ExplodedNode<ValueState>* NewN =
|
ExplodedNode<ValueState>* NewN =
|
||||||
G->getNode(N->getLocation(), N->getState());
|
G->getNode(N->getLocation(), N->getState());
|
||||||
|
|
||||||
|
if (!First) First = NewN;
|
||||||
if (Last) Last->addPredecessor(NewN);
|
if (Last) Last->addPredecessor(NewN);
|
||||||
|
|
||||||
Last = NewN;
|
Last = NewN;
|
||||||
N = N->pred_empty() ? 0 : *(N->pred_begin());
|
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,
|
void BugReporter::GeneratePathDiagnostic(PathDiagnostic& PD,
|
||||||
|
|
Loading…
Reference in New Issue