r206479 - clang-format.py: Don't omit the first two words from error messages.

Nico Weber nicolasweber at gmx.de
Thu Apr 17 10:51:57 PDT 2014


Author: nico
Date: Thu Apr 17 12:51:57 2014
New Revision: 206479

URL: http://llvm.org/viewvc/llvm-project?rev=206479&view=rev
Log:
clang-format.py: Don't omit the first two words from error messages.

This reverts r172072.  clang-format used to use DiagnosticEngine to output
errors: http://llvm.org/viewvc/llvm-project?view=revision&revision=172071. Now
it doesn't, so this code is obsolete.

Modified:
    cfe/trunk/tools/clang-format/clang-format.py

Modified: cfe/trunk/tools/clang-format/clang-format.py
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/tools/clang-format/clang-format.py?rev=206479&r1=206478&r2=206479&view=diff
==============================================================================
--- cfe/trunk/tools/clang-format/clang-format.py (original)
+++ cfe/trunk/tools/clang-format/clang-format.py Thu Apr 17 12:51:57 2014
@@ -59,12 +59,7 @@ def main():
 
   # If successful, replace buffer contents.
   if stderr:
-    message = stderr.splitlines()[0]
-    parts = message.split(' ', 2)
-    if len(parts) > 2:
-      message = parts[2]
-    print 'Formatting failed: %s (total %d warnings, %d errors)' % (
-        message, stderr.count('warning:'), stderr.count('error:'))
+    print stderr
 
   if not stdout:
     print ('No output from clang-format (crashed?).\n' +





More information about the cfe-commits mailing list