summaryrefslogtreecommitdiffstats
path: root/tools/clang-format
diff options
context:
space:
mode:
authorAlexander Kornienko <alexfh@google.com>2016-10-27 15:15:23 +0000
committerAlexander Kornienko <alexfh@google.com>2016-10-27 15:15:23 +0000
commit82e00e504e1d42407e8e5df9536dd3614ab69db1 (patch)
treeb2fc43964787a68710330b1ff801d082242da5c7 /tools/clang-format
parentca12756c3c4698a21b8a8ed681682da7dba09b1b (diff)
Attempt to make clang-format.py python 3 - compatible.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@285301 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/clang-format')
-rw-r--r--tools/clang-format/clang-format.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/clang-format/clang-format.py b/tools/clang-format/clang-format.py
index 5a5f99b259..aded301781 100644
--- a/tools/clang-format/clang-format.py
+++ b/tools/clang-format/clang-format.py
@@ -51,7 +51,7 @@ if vim.eval('exists("g:clang_format_fallback_style")') == "1":
def main():
# Get the current text.
encoding = vim.eval("&encoding")
- buf = [ unicode(line, encoding) for line in vim.current.buffer ]
+ buf = [ line.decode(encoding) for line in vim.current.buffer ]
text = '\n'.join(buf)
# Determine range to format.