]> granicus.if.org Git - clang/commitdiff
Fix terrible python goof in clang-format.py which broke my vim
authorChandler Carruth <chandlerc@gmail.com>
Thu, 4 Jun 2015 21:23:07 +0000 (21:23 +0000)
committerChandler Carruth <chandlerc@gmail.com>
Thu, 4 Jun 2015 21:23:07 +0000 (21:23 +0000)
integration.

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@239098 91177308-0d34-0410-b5e6-96231b3b80d8

tools/clang-format/clang-format.py

index baa6cdffbe3671b7969a6a4035eb4c00c9d00fd1..49ca773b049d6ce68df91f4295866150e8728c6a 100644 (file)
@@ -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))