Author: alexfh Date: Thu Oct 27 10:15:23 2016 New Revision: 285301 URL: http://llvm.org/viewvc/llvm-project?rev=285301&view=rev Log: Attempt to make clang-format.py python 3 - compatible.
Modified: cfe/trunk/tools/clang-format/clang-format.py Modified: cfe/trunk/tools/clang-format/clang-format.py URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/tools/clang-format/clang-format.py?rev=285301&r1=285300&r2=285301&view=diff ============================================================================== --- cfe/trunk/tools/clang-format/clang-format.py (original) +++ cfe/trunk/tools/clang-format/clang-format.py Thu Oct 27 10:15:23 2016 @@ -51,7 +51,7 @@ if vim.eval('exists("g:clang_format_fall 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. _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits