r238823 - Make vim also output a helpful message in some error cases.
Chandler Carruth
chandlerc at google.com
Thu Jun 4 14:27:15 PDT 2015
It's because the dict doesn't always have the key.
Fixed in r239098.
On Thu, Jun 4, 2015 at 2:21 PM Chandler Carruth <chandlerc at google.com>
wrote:
> After this, all my code produces this error... The message isn't very
> helpful, how should I debug this?
>
> On Tue, Jun 2, 2015 at 5:08 AM Manuel Klimek <klimek at google.com> wrote:
>
>> Author: klimek
>> Date: Tue Jun 2 07:01:50 2015
>> New Revision: 238823
>>
>> URL: http://llvm.org/viewvc/llvm-project?rev=238823&view=rev
>> Log:
>> Make vim also output a helpful message in some error cases.
>>
>> When clang-format encounters a syntax error, it will not format that
>> line; we're now using the same mechanism we're already using in emacs to
>> show a helpful error message to the user.
>>
>> 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=238823&r1=238822&r2=238823&view=diff
>>
>> ==============================================================================
>> --- cfe/trunk/tools/clang-format/clang-format.py (original)
>> +++ cfe/trunk/tools/clang-format/clang-format.py Tue Jun 2 07:01:50 2015
>> @@ -85,6 +85,8 @@ 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']:
>> + print 'clang-format: incomplete (syntax errors)'
>> vim.command('goto %d' % (output['Cursor'] + 1))
>>
>> main()
>>
>>
>> _______________________________________________
>> cfe-commits mailing list
>> cfe-commits at cs.uiuc.edu
>> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20150604/40c729bb/attachment.html>
More information about the cfe-commits
mailing list