[PATCH] D61559: Fix the crash when formatting unsupported encodings
Sam McCall via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon May 6 01:04:48 PDT 2019
sammccall accepted this revision.
sammccall added inline comments.
This revision is now accepted and ready to land.
================
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")
----------------
Seems unlikely we'll ever see any of these other than UTF{16,32}.
I'd suggest dropping them, but up to you.
================
Comment at: clang/tools/clang-format/ClangFormat.cpp:276
+ .StartsWith("\xDD\x73\x66\x73", "UTF-EBCDIC")
+ .StartsWith("\x0E\xFE\xFF", "SDSU")
+ .StartsWith("\xFB\xEE\x28", "BOCU-1")
----------------
SCSU?
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