[cfe-commits] [clang-tools-extra] r172072 - /clang-tools-extra/trunk/clang-format/clang-format.py
Alexander Kornienko
alexfh at google.com
Thu Apr 17 03:39:34 PDT 2014
On Thu, Apr 17, 2014 at 5:58 AM, Nico Weber <thakis at chromium.org> wrote:
> Hi Alex,
>
> On Thu, Jan 10, 2013 at 7:06 AM, Alexander Kornienko <alexfh at google.com>wrote:
>
>> 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]
>>
>
> Do you remember why the "message.split()' part (and the if) is here? If I
> use -style=file without a .clang-format file, clang-format prints "Can't
> find usable .clang-format, using LLVM style" (which makes sense), which
> this code transforms into "Formatting failed: usable .clang-format, using
> LLVM style (total 0 warnings, 0 errors)" (which is pretty confusing). Did
> clang-format used to print a prefix in front of errors?
>
Yes, clang-format used to use DiagnosticEngine to ouput errors:
http://llvm.org/viewvc/llvm-project?view=revision&revision=172071. Now it
doesn't output diagnostics and this code is obsolete.
> Can the 3 lines above just go away?
>
Feel free to remove them.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20140417/8117e0c5/attachment.html>
More information about the cfe-commits
mailing list