summaryrefslogtreecommitdiffstats
path: root/clang/tools/clang-format/clang-format.py
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
commit115d225cf1895e2a9d7c514ffb36dfe703cb2264 (patch)
tree79faf55bbff3c549382793c64db5a24dbb175245 /clang/tools/clang-format/clang-format.py
parentd4cd37facace84e678142fcafc1ba8608cf75b3c (diff)
downloadbcm5719-llvm-115d225cf1895e2a9d7c514ffb36dfe703cb2264.tar.gz
bcm5719-llvm-115d225cf1895e2a9d7c514ffb36dfe703cb2264.zip
Attempt to make clang-format.py python 3 - compatible.
llvm-svn: 285301
Diffstat (limited to 'clang/tools/clang-format/clang-format.py')
-rw-r--r--clang/tools/clang-format/clang-format.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/tools/clang-format/clang-format.py b/clang/tools/clang-format/clang-format.py
index 5a5f99b2598..aded301781b 100644
--- a/clang/tools/clang-format/clang-format.py
+++ b/clang/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.
OpenPOWER on IntegriCloud