r317205 - Fix clang-format CLion integration bug.
Eric Liu via cfe-commits
cfe-commits at lists.llvm.org
Thu Nov 2 05:48:48 PDT 2017
Author: ioeric
Date: Thu Nov 2 05:48:48 2017
New Revision: 317205
URL: http://llvm.org/viewvc/llvm-project?rev=317205&view=rev
Log:
Fix clang-format CLion integration bug.
CLion's Sax parser threw this error:
Failed to parse clang-format XML replacements. Input: <?xml version='1.0'?>
<replacements xml:space='preserve' incomplete_format='true' line=89>
[...]
[org.xml.sax.SAXParseException; lineNumber: 2; columnNumber: 66; Open quote is expected for attribute "line" associated with an element type "replacements".]
Patch by Justine Tunney (jart at google.com)!
Modified:
cfe/trunk/tools/clang-format/ClangFormat.cpp
Modified: cfe/trunk/tools/clang-format/ClangFormat.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/tools/clang-format/ClangFormat.cpp?rev=317205&r1=317204&r2=317205&view=diff
==============================================================================
--- cfe/trunk/tools/clang-format/ClangFormat.cpp (original)
+++ cfe/trunk/tools/clang-format/ClangFormat.cpp Thu Nov 2 05:48:48 2017
@@ -289,7 +289,7 @@ static bool format(StringRef FileName) {
"xml:space='preserve' incomplete_format='"
<< (Status.FormatComplete ? "false" : "true") << "'";
if (!Status.FormatComplete)
- outs() << " line=" << Status.Line;
+ outs() << " line='" << Status.Line << "'";
outs() << ">\n";
if (Cursor.getNumOccurrences() != 0)
outs() << "<cursor>"
More information about the cfe-commits
mailing list