<div dir="ltr">Looks like this patch broke handling of multiple files: <a href="https://llvm.org/PR24637">https://llvm.org/PR24637</a><div class="gmail_extra"><br></div><div class="gmail_extra">Can you take a look at this?</div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Aug 21, 2015 at 12:56 PM, Yaron Keren <span dir="ltr"><<a href="mailto:yaron.keren@gmail.com" target="_blank">yaron.keren@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="rtl"><div dir="ltr">Whenever is any special character in the filename, such as space or backslash (Windows), some examples:</div><div dir="ltr"><br></div><div dir="ltr">On Windows:</div><div dir="ltr"><div dir="ltr">--- ".\\a.cpp" 2015-08-21 00:22:57.885370200 +0300</div><div dir="ltr">+++ b.cpp 2015-08-21 01:05:28.726269900 +0300</div><div dir="ltr"><br></div><div dir="ltr"><div dir="ltr">--- ./a.cpp 2015-08-21 00:22:57.885370200 +0300</div><div dir="ltr">+++ b.cpp 2015-08-21 01:05:28.726269900 +0300</div><div dir="ltr"><br></div><div dir="ltr"><div dir="ltr">--- "a a.cpp" 2015-08-21 00:22:57.885370200 +0300</div><div dir="ltr">+++ b.cpp 2015-08-21 01:05:28.726269900 +0300</div><div dir="ltr"><br></div><div>On Linux:</div><div><div>~$ diff -U0 ./a.cpp b\ b.cpp</div><div>--- ./a.cpp 2015-08-14 00:27:03.569276652 +0300</div><div>+++ "b b.cpp" 2015-08-21 13:54:26.787896719 +0300</div></div><div><br></div><div>filename with space will break current clang-tidy-diff.py on all platforms, the regular expression does not match quotes.<br></div><div>There is surely some Python package to process filenames correctly if this ever become a problem.</div></div></div></div><div dir="ltr"><br></div></div><div class=""><div class="h5"><div class="gmail_extra"><div dir="ltr"><br><div class="gmail_quote">2015-08-21 13:37 GMT+03:00 Alexander Kornienko <span dir="ltr"><<a href="mailto:alexfh@google.com" target="_blank">alexfh@google.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div class="gmail_extra"><div class="gmail_quote"><span>On Fri, Aug 21, 2015 at 11:27 AM, Yaron Keren via cfe-commits <span dir="ltr"><<a href="mailto:cfe-commits@lists.llvm.org" target="_blank">cfe-commits@lists.llvm.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">Author: yrnkrn<br>
Date: Fri Aug 21 04:27:24 2015<br>
New Revision: 245683<br>
<br>
URL: <a href="http://llvm.org/viewvc/llvm-project?rev=245683&view=rev" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project?rev=245683&view=rev</a><br>
Log:<br>
Tweak clang-tidy-diff.py to recognize "filename" in the diff ourput</blockquote><div><br></div></span>Out of curiosity, when does this happen? (I mean quotes around the file name)<span><br><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"> <br></blockquote><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<br>
Modified:<br>
clang-tools-extra/trunk/clang-tidy/tool/clang-tidy-diff.py<br>
<br>
Modified: clang-tools-extra/trunk/clang-tidy/tool/clang-tidy-diff.py<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/clang-tidy/tool/clang-tidy-diff.py?rev=245683&r1=245682&r2=245683&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/clang-tidy/tool/clang-tidy-diff.py?rev=245683&r1=245682&r2=245683&view=diff</a><br>
==============================================================================<br>
--- clang-tools-extra/trunk/clang-tidy/tool/clang-tidy-diff.py (original)<br>
+++ clang-tools-extra/trunk/clang-tidy/tool/clang-tidy-diff.py Fri Aug 21 04:27:24 2015<br>
@@ -67,7 +67,7 @@ def main():<br>
filename = None<br>
lines_by_file = {}<br>
for line in sys.stdin:<br>
- match = re.search('^\+\+\+\ (.*?/){%s}(\S*)' % args.p, line)<br>
+ match = re.search('^\+\+\+\ \"?(.*?/){%s}([^ \t\"]*)' % args.p, line)<br>
if match:<br>
filename = match.group(2)<br>
if filename == None:<br>
<br>
<br>
_______________________________________________<br>
cfe-commits mailing list<br>
<a href="mailto:cfe-commits@lists.llvm.org" target="_blank">cfe-commits@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits</a><br>
</blockquote></span></div><div><br></div>
</div></blockquote></div></div></div>
</div></div></blockquote></div><br><br>
</div></div>