From: Alexander Kornienko Date: Thu, 27 Oct 2016 15:15:23 +0000 (+0000) Subject: Attempt to make clang-format.py python 3 - compatible. X-Git-Tag: llvmorg-4.0.0-rc1~6132 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=115d225cf1895e2a9d7c514ffb36dfe703cb2264;p=platform%2Fupstream%2Fllvm.git Attempt to make clang-format.py python 3 - compatible. llvm-svn: 285301 --- diff --git a/clang/tools/clang-format/clang-format.py b/clang/tools/clang-format/clang-format.py index 5a5f99b..aded301 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.