<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">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=y8kn9a7TAUVoGlmp86tvofZ4fQcTLGTH8-w4SWESTq0&s=i6f2gfaL0RLTNFw7OdsobeBXXlpaDs9ltbbzvchUplA&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=y8kn9a7TAUVoGlmp86tvofZ4fQcTLGTH8-w4SWESTq0&s=KRcjkGz4tIFHqNvaIAZYDvXPcTdMe2nw6BzkZek9nbY&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>