This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG8f4e6cfe73d8: [clang-format] Use utf-8 for JSON object load (authored by kaitingwang, committed by ldrumm).
Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D133236/new/ https://reviews.llvm.org/D133236 Files: clang/tools/clang-format/clang-format.py Index: clang/tools/clang-format/clang-format.py =================================================================== --- clang/tools/clang-format/clang-format.py +++ clang/tools/clang-format/clang-format.py @@ -10,9 +10,9 @@ # imap <C-I> <c-o>:py3f <path-to-this-file>/clang-format.py<cr> # endif # -# The if-elseif-endif conditional should pick either the python3 or python2 +# The if-elseif-endif conditional should pick either the python3 or python2 # integration depending on your vim setup. -# +# # The first mapping enables clang-format for NORMAL and VISUAL mode, the second # mapping adds support for INSERT mode. Change "C-I" to another binding if you # need clang-format on a different key (C-I stands for Ctrl+i). @@ -134,7 +134,7 @@ ) else: header, content = stdout.split(b'\n', 1) - header = json.loads(header) + header = json.loads(header.decode('utf-8')) # Strip off the trailing newline (added above). # This maintains trailing empty lines present in the buffer if # the -lines specification requests them to remain unchanged.
Index: clang/tools/clang-format/clang-format.py =================================================================== --- clang/tools/clang-format/clang-format.py +++ clang/tools/clang-format/clang-format.py @@ -10,9 +10,9 @@ # imap <C-I> <c-o>:py3f <path-to-this-file>/clang-format.py<cr> # endif # -# The if-elseif-endif conditional should pick either the python3 or python2 +# The if-elseif-endif conditional should pick either the python3 or python2 # integration depending on your vim setup. -# +# # The first mapping enables clang-format for NORMAL and VISUAL mode, the second # mapping adds support for INSERT mode. Change "C-I" to another binding if you # need clang-format on a different key (C-I stands for Ctrl+i). @@ -134,7 +134,7 @@ ) else: header, content = stdout.split(b'\n', 1) - header = json.loads(header) + header = json.loads(header.decode('utf-8')) # Strip off the trailing newline (added above). # This maintains trailing empty lines present in the buffer if # the -lines specification requests them to remain unchanged.
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits