[cfe-commits] r67847 - /cfe/trunk/lib/Frontend/PlistDiagnostics.cpp
Ted Kremenek
kremenek at apple.com
Fri Mar 27 08:53:36 PDT 2009
Author: kremenek
Date: Fri Mar 27 10:53:20 2009
New Revision: 67847
URL: http://llvm.org/viewvc/llvm-project?rev=67847&view=rev
Log:
analyzer plist: For PathDiagnosticControlFlowPieces, now output an array of
start-end points, where start and end are source ranges.
Modified:
cfe/trunk/lib/Frontend/PlistDiagnostics.cpp
Modified: cfe/trunk/lib/Frontend/PlistDiagnostics.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Frontend/PlistDiagnostics.cpp?rev=67847&r1=67846&r2=67847&view=diff
==============================================================================
--- cfe/trunk/lib/Frontend/PlistDiagnostics.cpp (original)
+++ cfe/trunk/lib/Frontend/PlistDiagnostics.cpp Fri Mar 27 10:53:20 2009
@@ -108,12 +108,33 @@
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()) {
More information about the cfe-commits
mailing list