[llvm-bugs] [Bug 35946] New: error with let l:lines = "all" in clang-format.py

via llvm-bugs llvm-bugs at lists.llvm.org
Mon Jan 15 03:18:43 PST 2018


https://bugs.llvm.org/show_bug.cgi?id=35946

            Bug ID: 35946
           Summary: error with let l:lines = "all" in clang-format.py
           Product: clang
           Version: 5.0
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: Formatter
          Assignee: unassignedclangbugs at nondot.org
          Reporter: george.dimaki at gmail.com
                CC: djasper at google.com, klimek at google.com,
                    llvm-bugs at lists.llvm.org

clang version 5.0.1
Arch linux

Snippet of init.vim file:

function FormatCPPFile()
  let l:lines = "all"
  pyf /usr/share/clang/clang-format.py
endfunction

autocmd FileType cpp map <buffer> <silent><C-I> :call FormatCPPFile()<CR>

Here's what I get in nvim (NVIM v0.2.2) when C-I was pressed:

error: invalid <start line>:<end line> pair                                     
No output from clang-format (crashed?).
Please report to bugs.llvm.org.

Looks like the problem is here:
nvim -d cfe-5.0.0.src/tools/clang-format/clang-format.py
cfe-5.0.1.src/tools/clang-format/clang-format.py

Here is the difference:
(cfe-5.0.0) line 65:  lines = vim.eval('l:lines')
(cfe-5.0.1) line 65:  lines = ['-lines', vim.eval('l:lines')]

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20180115/02e1bd5f/attachment.html>


More information about the llvm-bugs mailing list