[PATCH] D37011: [clang-format] Fix lines regression in clang-format.py

Krasimir Georgiev via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Aug 22 06:30:37 PDT 2017


krasimir created this revision.

This patch fixes a regression after https://reviews.llvm.org/rL305665,
which updates the structure of the `lines` variable.


https://reviews.llvm.org/D37011

Files:
  tools/clang-format/clang-format.py


Index: tools/clang-format/clang-format.py
===================================================================
--- tools/clang-format/clang-format.py
+++ tools/clang-format/clang-format.py
@@ -62,7 +62,7 @@
 
   # Determine range to format.
   if vim.eval('exists("l:lines")') == '1':
-    lines = vim.eval('l:lines')
+    lines = ['-lines', vim.eval('l:lines')]
   elif vim.eval('exists("l:formatdiff")') == '1':
     with open(vim.current.buffer.name, 'r') as f:
       ondisk = f.read().splitlines();


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D37011.112164.patch
Type: text/x-patch
Size: 503 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20170822/fbc9eaa7/attachment.bin>


More information about the cfe-commits mailing list