diff options
Diffstat (limited to 'tools/clang-format/ClangFormat.cpp')
-rw-r--r-- | tools/clang-format/ClangFormat.cpp | 16 |
1 files changed, 5 insertions, 11 deletions
diff --git a/tools/clang-format/ClangFormat.cpp b/tools/clang-format/ClangFormat.cpp index ae2180c837..fe7d678852 100644 --- a/tools/clang-format/ClangFormat.cpp +++ b/tools/clang-format/ClangFormat.cpp @@ -225,17 +225,14 @@ static bool format(StringRef FileName) { FormatStyle FormatStyle = getStyle( Style, (FileName == "-") ? AssumeFilename : FileName, FallbackStyle); - bool IncompleteFormat = false; - tooling::Replacements Replaces = reformat(FormatStyle, Sources, ID, Ranges, &IncompleteFormat); + tooling::Replacements Replaces = reformat(FormatStyle, Sources, ID, Ranges); if (OutputXML) { - llvm::outs() << "<?xml version='1.0'?>\n<replacements " - "xml:space='preserve' incomplete_format='" - << (IncompleteFormat ? "true" : "false") << "'>\n"; + llvm::outs() + << "<?xml version='1.0'?>\n<replacements xml:space='preserve'>\n"; if (Cursor.getNumOccurrences() != 0) llvm::outs() << "<cursor>" << tooling::shiftedCodePosition(Replaces, Cursor) << "</cursor>\n"; - for (tooling::Replacements::const_iterator I = Replaces.begin(), E = Replaces.end(); I != E; ++I) { @@ -255,12 +252,9 @@ static bool format(StringRef FileName) { else if (Rewrite.overwriteChangedFiles()) return true; } else { - outs() << "{"; if (Cursor.getNumOccurrences() != 0) - outs() << " \"Cursor\": " - << tooling::shiftedCodePosition(Replaces, Cursor) << ","; - outs() << " \"IncompleteFormat\": " - << (IncompleteFormat ? "true" : "false") << " }\n"; + outs() << "{ \"Cursor\": " + << tooling::shiftedCodePosition(Replaces, Cursor) << " }\n"; Rewrite.getEditBuffer(ID).write(outs()); } } |