[llvm-bugs] [Bug 35368] New: Clang-Format script for vim fails if a line range is given
via llvm-bugs
llvm-bugs at lists.llvm.org
Mon Nov 20 10:00:10 PST 2017
https://bugs.llvm.org/show_bug.cgi?id=35368
Bug ID: 35368
Summary: Clang-Format script for vim fails if a line range is
given
Product: clang
Version: 5.0
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P
Component: Formatter
Assignee: unassignedclangbugs at nondot.org
Reporter: eyenseo at gmail.com
CC: djasper at google.com, klimek at google.com,
llvm-bugs at lists.llvm.org
Basically the following is executed from "<path-to-this-file>/clang-format.py"
if you define l:lines=59:72 before calling:
['clang-format', '-style', 'file', '-cursor', '1658', '6', '9', ':', '7', '2',
'-assume-filename', '/tmp/foo.cpp']
but the correct command would be
['clang-format', '-style', 'file', '-cursor', '1658', '-lines', '68:72',
'-assume-filename', '/tmp/foo.cpp']
Line 96 with "command += lines" is the culprit and has to be
"command.extend(["-lines", lines])"
It would be nice if someone can make a commit from this - I have had a look at
the "Getting involved" pages but have no experience with svn / svn patch
generation and am not willing to invest a lot of time for this one liner. For
the next time - would it be better to send a message like this to one of the
mailing lists or did I do the 'right' thing in opening a bug?
Thank you for your hard work! :)
--
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/20171120/e0e885b8/attachment.html>
More information about the llvm-bugs
mailing list