r239098 - Fix terrible python goof in clang-format.py which broke my vim

Chandler Carruth chandlerc at gmail.com
Thu Jun 4 14:23:07 PDT 2015


Author: chandlerc
Date: Thu Jun  4 16:23:07 2015
New Revision: 239098

URL: http://llvm.org/viewvc/llvm-project?rev=239098&view=rev
Log:
Fix terrible python goof in clang-format.py which broke my vim
integration.

Nothing is more important in life than clang-format integration with
vim. ;]

Modified:
    cfe/trunk/tools/clang-format/clang-format.py

Modified: cfe/trunk/tools/clang-format/clang-format.py
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/tools/clang-format/clang-format.py?rev=239098&r1=239097&r2=239098&view=diff
==============================================================================
--- cfe/trunk/tools/clang-format/clang-format.py (original)
+++ cfe/trunk/tools/clang-format/clang-format.py Thu Jun  4 16:23:07 2015
@@ -85,7 +85,7 @@ def main():
     for op in reversed(sequence.get_opcodes()):
       if op[0] is not 'equal':
         vim.current.buffer[op[1]:op[2]] = lines[op[3]:op[4]]
-    if output['IncompleteFormat']:
+    if output.get('IncompleteFormat'):
       print 'clang-format: incomplete (syntax errors)'
     vim.command('goto %d' % (output['Cursor'] + 1))
 





More information about the cfe-commits mailing list