[PATCH] D138234: [clang-format] Support new file formatting with vim
Owen Pan via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Nov 17 22:49:35 PST 2022
owenpan added inline comments.
================
Comment at: clang/tools/clang-format/clang-format.py:48
import vim
+import os.path
----------------
Can you move it up to keep the module names sorted?
================
Comment at: clang/tools/clang-format/clang-format.py:80
lines = ['-lines', vim.eval('l:lines')]
- elif vim.eval('exists("l:formatdiff")') == '1':
+ elif vim.eval('exists("l:formatdiff")') == '1' and os.path.exists(vim.current.buffer.name):
with open(vim.current.buffer.name, 'r') as f:
----------------
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D138234/new/
https://reviews.llvm.org/D138234
More information about the cfe-commits
mailing list