[cfe-commits] [clang-tools-extra] r172072 - /clang-tools-extra/trunk/clang-format/clang-format.py
Alexander Kornienko
alexfh at google.com
Thu Jan 10 07:06:57 PST 2013
Author: alexfh
Date: Thu Jan 10 09:06:57 2013
New Revision: 172072
URL: http://llvm.org/viewvc/llvm-project?rev=172072&view=rev
Log:
Improved clang-format integration support for diagnostic messages output
Modified:
clang-tools-extra/trunk/clang-format/clang-format.py
Modified: clang-tools-extra/trunk/clang-format/clang-format.py
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/clang-format/clang-format.py?rev=172072&r1=172071&r2=172072&view=diff
==============================================================================
--- clang-tools-extra/trunk/clang-format/clang-format.py (original)
+++ clang-tools-extra/trunk/clang-format/clang-format.py Thu Jan 10 09:06:57 2013
@@ -41,7 +41,12 @@
# If successful, replace buffer contents.
if stderr:
- print 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:'))
else:
if not stdout:
print 'Segfault occurred. Please report to bugs.llvm.org.'
More information about the cfe-commits
mailing list