[llvm-bugs] [Bug 33946] New: Clang-format crashes on file with UCS-2 LE BOM encoding Assertion failed: getClient() && "DiagnosticClient not set!"
via llvm-bugs
llvm-bugs at lists.llvm.org
Wed Jul 26 02:38:32 PDT 2017
https://bugs.llvm.org/show_bug.cgi?id=33946
Bug ID: 33946
Summary: Clang-format crashes on file with UCS-2 LE BOM
encoding Assertion failed: getClient() &&
"DiagnosticClient not set!"
Product: clang
Version: 4.0
Hardware: PC
OS: Windows NT
Status: NEW
Severity: enhancement
Priority: P
Component: Formatter
Assignee: unassignedclangbugs at nondot.org
Reporter: jvapen at gmail.com
CC: djasper at google.com, klimek at google.com,
llvm-bugs at lists.llvm.org
Created attachment 18849
--> https://bugs.llvm.org/attachment.cgi?id=18849&action=edit
Reproduction files
Found on clang-format 4.0.1 when trying to use on Windows.
A file created via
clang-format test.cpp > test.formatted.cpp
will be in in UCS-2 LE BOM (according to notepad++) by default on Windows.
(Note that we don't use -i as this touches the file when no formatting needs to
occur)
If we than run:
clang-format test.formatted.cpp
We get: Assertion failed: getClient() && "DiagnosticClient not set!"
In attachment you can test.cpp (no _clang-format file needed for reproduction),
which crashes the executable when ran as:
clang-format test.cpp
If converted to UTF-8/Ascii we don't get a crash
Using clang-format version 4.0.1 (tags/RELEASE_401/final)
(from the 64-bit installer)
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20170726/c9fb3fe6/attachment-0001.html>
More information about the llvm-bugs
mailing list