[cfe-commits] r111610 - in /cfe/trunk: docs/UsersManual.html lib/Frontend/TextDiagnosticPrinter.cpp

Douglas Gregor dgregor at apple.com
Thu Aug 19 20:17:34 PDT 2010


Author: dgregor
Date: Thu Aug 19 22:17:33 2010
New Revision: 111610

URL: http://llvm.org/viewvc/llvm-project?rev=111610&view=rev
Log:
Eliminate some extraneous whitespace in the machine-parseable Fix-It output.

Modified:
    cfe/trunk/docs/UsersManual.html
    cfe/trunk/lib/Frontend/TextDiagnosticPrinter.cpp

Modified: cfe/trunk/docs/UsersManual.html
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/docs/UsersManual.html?rev=111610&r1=111609&r2=111610&view=diff
==============================================================================
--- cfe/trunk/docs/UsersManual.html (original)
+++ cfe/trunk/docs/UsersManual.html Thu Aug 19 22:17:33 2010
@@ -365,10 +365,10 @@
 <dd><p>This option makes Clang print available Fix-Its in a machine parseable format at the end of diagnostics. The following example illustrates the format:</p>
 
 <pre>
- fix-it: "t.cpp":{7:25-7:29}: "Gamma"
+ fix-it:"t.cpp":{7:25-7:29}:"Gamma"
 </pre>
 
-<p>The range printed is a half-open range, so in this example the characters at column 25 up to but not including column 29 on line 7 in t.cpp should be replaced with the string "Gamma". Either the range or the replacement string may be empty (representing strict insertions and strict erasures, respectively). Both the file name and the insertion string escape '\', tabs (as "\t"), newlines (as "\n"), double quotes(as "\"") and non-printable characters (as octal "\xxx").</p>
+<p>The range printed is a half-open range, so in this example the characters at column 25 up to but not including column 29 on line 7 in t.cpp should be replaced with the string "Gamma". Either the range or the replacement string may be empty (representing strict insertions and strict erasures, respectively). Both the file name and the insertion string escape backslash (as "\"), tabs (as "\t"), newlines (as "\n"), double quotes(as "\"") and non-printable characters (as octal "\xxx").</p>
 </dd>
 
 </dl>

Modified: cfe/trunk/lib/Frontend/TextDiagnosticPrinter.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Frontend/TextDiagnosticPrinter.cpp?rev=111610&r1=111609&r2=111610&view=diff
==============================================================================
--- cfe/trunk/lib/Frontend/TextDiagnosticPrinter.cpp (original)
+++ cfe/trunk/lib/Frontend/TextDiagnosticPrinter.cpp Thu Aug 19 22:17:33 2010
@@ -567,13 +567,13 @@
 
         // We specifically do not do word-wrapping or tab-expansion here,
         // because this is supposed to be easy to parse.
-        OS << " fix-it: \"";
+        OS << "fix-it:\"";
         OS.write_escaped(SM.getPresumedLoc(B).getFilename());
         OS << "\":{" << SM.getLineNumber(BInfo.first, BInfo.second)
           << ':' << SM.getColumnNumber(BInfo.first, BInfo.second)
           << '-' << SM.getLineNumber(EInfo.first, EInfo.second)
           << ':' << SM.getColumnNumber(EInfo.first, EInfo.second)
-          << "}: \"";
+          << "}:\"";
         OS.write_escaped(Hint->CodeToInsert);
         OS << "\"\n";
       }





More information about the cfe-commits mailing list