[PATCH] D61559: Fix the crash when formatting unsupported encodings

Owen Pan via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed May 8 07:05:55 PDT 2019


owenpan marked an inline comment as done.
owenpan added inline comments.


================
Comment at: clang/tools/clang-format/ClangFormat.cpp:273
+    .StartsWith("\xFF\xFE", "UTF-16 (LE)")
+    .StartsWith("\x2B\x2F\x76", "UTF-7")
+    .StartsWith("\xF7\x64\x4C", "UTF-1")
----------------
sammccall wrote:
> Seems unlikely we'll ever see any of these other than UTF{16,32}.
> I'd suggest dropping them, but up to you.
I will keep the rare BOM cases to keep it in sync with D61628.


Repository:
  rC Clang

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D61559/new/

https://reviews.llvm.org/D61559





More information about the cfe-commits mailing list