<p dir="ltr">Nope, the fix is good anyway. Just wanted to understand what went wrong. And let you know that you might be on an outdated version :)</p>
<br><div class="gmail_quote"><div dir="ltr">On Fri, Jun 5, 2015, 9:16 AM Chandler Carruth <<a href="mailto:chandlerc@google.com">chandlerc@google.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><p dir="ltr">It's possible. I don't think my script and my clang format binary are version locked. Should they be? Is that important?</p>
<br><div class="gmail_quote"><div dir="ltr">On Thu, Jun 4, 2015, 21:45 Manuel Klimek <<a href="mailto:klimek@google.com" target="_blank">klimek@google.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><p dir="ltr">Were you on an outdated version of clang-format?</p>
<br><div class="gmail_quote"><div dir="ltr">On Thu, Jun 4, 2015, 11:27 PM Chandler Carruth <<a href="mailto:chandlerc@google.com" target="_blank">chandlerc@google.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">It's because the dict doesn't always have the key.<br><br>Fixed in r239098.</div><br><div class="gmail_quote"><div dir="ltr">On Thu, Jun 4, 2015 at 2:21 PM Chandler Carruth <<a href="mailto:chandlerc@google.com" target="_blank">chandlerc@google.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">After this, all my code produces this error... The message isn't very helpful, how should I debug this?<br></div><br><div class="gmail_quote"><div dir="ltr">On Tue, Jun 2, 2015 at 5:08 AM Manuel Klimek <<a href="mailto:klimek@google.com" target="_blank">klimek@google.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Author: klimek<br>
Date: Tue Jun 2 07:01:50 2015<br>
New Revision: 238823<br>
<br>
URL: <a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__llvm.org_viewvc_llvm-2Dproject-3Frev-3D238823-26view-3Drev&d=AwMFaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=BSqEv9KvKMW_Ob8SyngJ70KdZISM_ASROnREeq0cCxk&m=fqbn_R16rShb17L9CrQjS5knZ04W6_RwHHTwVcw8SvY&s=0gAZss15-Bzlp-7yQnIyJSjzOQnHMoYjWkKCClxx1Tk&e=" target="_blank">http://llvm.org/viewvc/llvm-project?rev=238823&view=rev</a><br>
Log:<br>
Make vim also output a helpful message in some error cases.<br>
<br>
When clang-format encounters a syntax error, it will not format that<br>
line; we're now using the same mechanism we're already using in emacs to<br>
show a helpful error message to the user.<br>
<br>
Modified:<br>
cfe/trunk/tools/clang-format/clang-format.py<br>
<br>
Modified: cfe/trunk/tools/clang-format/clang-format.py<br>
URL: <a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__llvm.org_viewvc_llvm-2Dproject_cfe_trunk_tools_clang-2Dformat_clang-2Dformat.py-3Frev-3D238823-26r1-3D238822-26r2-3D238823-26view-3Ddiff&d=AwMFaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=BSqEv9KvKMW_Ob8SyngJ70KdZISM_ASROnREeq0cCxk&m=fqbn_R16rShb17L9CrQjS5knZ04W6_RwHHTwVcw8SvY&s=12ZGaUZ3POJtacrOhqrF56HAUMjPOT3u9jsYdZQgVFU&e=" target="_blank">http://llvm.org/viewvc/llvm-project/cfe/trunk/tools/clang-format/clang-format.py?rev=238823&r1=238822&r2=238823&view=diff</a><br>
==============================================================================<br>
--- cfe/trunk/tools/clang-format/clang-format.py (original)<br>
+++ cfe/trunk/tools/clang-format/clang-format.py Tue Jun 2 07:01:50 2015<br>
@@ -85,6 +85,8 @@ def main():<br>
for op in reversed(sequence.get_opcodes()):<br>
if op[0] is not 'equal':<br>
vim.current.buffer[op[1]:op[2]] = lines[op[3]:op[4]]<br>
+ if output['IncompleteFormat']:<br>
+ print 'clang-format: incomplete (syntax errors)'<br>
vim.command('goto %d' % (output['Cursor'] + 1))<br>
<br>
main()<br>
<br>
<br>
_______________________________________________<br>
cfe-commits mailing list<br>
<a href="mailto:cfe-commits@cs.uiuc.edu" target="_blank">cfe-commits@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits</a><br>
</blockquote></div></blockquote></div>
</blockquote></div>
</blockquote></div>
</blockquote></div>