<html>
    <head>
      <base href="https://bugs.llvm.org/">
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - clang-cl crashes when compiling incorrect code"
   href="https://bugs.llvm.org/show_bug.cgi?id=35325">35325</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>clang-cl crashes when compiling incorrect code
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>clang
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>trunk
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>PC
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Windows NT
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>normal
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>Driver
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>unassignedclangbugs@nondot.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>tusklahoma@gmail.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Created <span class=""><a href="attachment.cgi?id=19426" name="attach_19426" title="Auto-generated crash dump">attachment 19426</a> <a href="attachment.cgi?id=19426&action=edit" title="Auto-generated crash dump">[details]</a></span>
Auto-generated crash dump

Occasionally when compiling code in the PowerShell terminal in Visual Studio
Code clang-cl will crash instead of displaying the proper error message. I have
only been able to reproduce this crash in Visual Studio Code's PowerShell
terminal. This does not occur in an independent PowerShell session (could be a
Visual Studio Code problem?).

The code being compiled was a simple hello world program, intentionally
malformed using single quotes for the string rather than the proper double
quotes -> 'Hello, World!\n'

Attached is the crash backtrace, preprocessed source, and run script.

Platform: Windows 10 Pro x64 Version 1709 (Fall Creator's Update)
Visual Studio Code Insiders 1.19.0 x64 with
Latest Windows 64-bit LLVM SVN Build from <a href="https://llvm.org/builds/">https://llvm.org/builds/</a>
clang-cl options: /std:c++17 /TP /Wall /WX

Steps to reproduce (though only sometimes occurs):

1) Open broken Hello World (using 'Hello, World!\n' rather than "Hello,
World!\n" in std::cout line) source in Visual Studio Code

2) Open integrated PowerShell terminal in Visual Studio Code
3) Compile hello_world with 'clang-cl.exe /std:c++17 /TP /Wall /WX
hello_world.cpp'

Expected results:
clang-cl prints out proper error message and cleanly exits as such:
.\hello_world.cpp(5,15):  error: multi-character character constant
[-Werror,-Wmultichar]
        std::cout << 'Hello, World!\n';
                     ^
.\hello_world.cpp(5,15):  error: character constant too long for its type
[-Werror]
2 errors generated.

Actual results:
clang-cl crashes printing gibberish to the console and displays bug report
notice.</pre>
        </div>
      </p>


      <hr>
      <span>You are receiving this mail because:</span>

      <ul>
          <li>You are on the CC list for the bug.</li>
      </ul>
    </body>
</html>