From: Chandler Carruth Date: Thu, 4 Jun 2015 21:23:07 +0000 (+0000) Subject: Fix terrible python goof in clang-format.py which broke my vim X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=7e8c5e2eb03ccdea1158f9fc194ffb38faf18e36;p=clang 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. ;] git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@239098 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/tools/clang-format/clang-format.py b/tools/clang-format/clang-format.py index baa6cdffbe..49ca773b04 100644 --- a/tools/clang-format/clang-format.py +++ b/tools/clang-format/clang-format.py @@ -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))