diff --git a/clang/lib/Driver/PlistDiagnostics.cpp b/clang/lib/Driver/PlistDiagnostics.cpp index 72d64ed1a88f..b7e8385409b0 100644 --- a/clang/lib/Driver/PlistDiagnostics.cpp +++ b/clang/lib/Driver/PlistDiagnostics.cpp @@ -98,7 +98,7 @@ static void EmitRange(llvm::raw_ostream& o, SourceManager* SM, SourceRange R, static void ReportDiag(llvm::raw_ostream& o, const PathDiagnosticPiece& P, const FIDMap& FM, SourceManager* SM) { - unsigned indent = 2; + unsigned indent = 4; Indent(o, indent) << "\n"; ++indent; @@ -115,7 +115,9 @@ static void ReportDiag(llvm::raw_ostream& o, const PathDiagnosticPiece& P, if (RI != RE) { Indent(o, indent) << "ranges\n"; Indent(o, indent) << "\n"; + ++indent; for ( ; RI != RE; ++RI ) EmitRange(o, SM, *RI, FM, indent+1); + --indent; Indent(o, indent) << "\n"; } @@ -223,7 +225,7 @@ PlistDiagnostics::~PlistDiagnostics() { o << " \n"; // Output the bug type and bug category. - o << " description\n " << D->getDescription() + o << " description\n " << D->getDescription() << "\n" << " category\n " << D->getCategory() << "\n"