forked from OSchip/llvm-project
analyzer plist: For PathDiagnosticControlFlowPieces, now output an array of
start-end points, where start and end are source ranges. llvm-svn: 67847
This commit is contained in:
parent
227815437a
commit
15b3753858
|
@ -108,12 +108,33 @@ static void ReportControlFlow(llvm::raw_ostream& o,
|
|||
|
||||
Indent(o, indent) << "<key>kind</key><string>control</string>\n";
|
||||
|
||||
// FIXME: Eventually remove (DEPRECATED)
|
||||
// Output the start and end locations.
|
||||
Indent(o, indent) << "<key>start</key>\n";
|
||||
EmitLocation(o, SM, P.getStartLocation(), FM, indent);
|
||||
Indent(o, indent) << "<key>end</key>\n";
|
||||
EmitLocation(o, SM, P.getEndLocation(), FM, indent);
|
||||
|
||||
// Emit edges.
|
||||
Indent(o, indent) << "<key>edges</key>\n";
|
||||
++indent;
|
||||
Indent(o, indent) << "<array>\n";
|
||||
++indent;
|
||||
for (PathDiagnosticControlFlowPiece::const_iterator I=P.begin(), E=P.end();
|
||||
I!=E; ++I) {
|
||||
Indent(o, indent) << "<dict>\n";
|
||||
++indent;
|
||||
Indent(o, indent) << "<key>start</key>\n";
|
||||
EmitRange(o, SM, I->getStart().asRange(), FM, indent+1);
|
||||
Indent(o, indent) << "<key>end</key>\n";
|
||||
EmitRange(o, SM, I->getEnd().asRange(), FM, indent+1);
|
||||
--indent;
|
||||
Indent(o, indent) << "</dict>\n";
|
||||
}
|
||||
--indent;
|
||||
Indent(o, indent) << "</array>\n";
|
||||
--indent;
|
||||
|
||||
// Output any helper text.
|
||||
const std::string& s = P.getString();
|
||||
if (!s.empty()) {
|
||||
|
|
Loading…
Reference in New Issue