<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 - ICE/Segfault when parsing incorrect template arguments of nested classes, OS X only?"
   href="https://bugs.llvm.org/show_bug.cgi?id=40374">40374</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>ICE/Segfault when parsing incorrect template arguments of nested classes, OS X only?
          </td>
        </tr>

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

        <tr>
          <th>Version</th>
          <td>7.0
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>Macintosh
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>MacOS X
          </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>-New Bugs
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>markus@dreseler.de
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>htmldeveloper@gmail.com, llvm-bugs@lists.llvm.org, neeilans@live.com, richard-llvm@metafoo.co.uk
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Created <span class=""><a href="attachment.cgi?id=21354" name="attach_21354" title="Crash info">attachment 21354</a> <a href="attachment.cgi?id=21354&action=edit" title="Crash info">[details]</a></span>
Crash info

The following code leads to an ICE:


#include <type_traits>
class JoinHash {};
template <typename LeftType, typename = std::enable_if_t<bool>
class JoinHash::JoinHashImpl {};


Error:

1.      clangice.cpp:6:30: current parser token '{'
0  clang-7                  0x000000010a9e2356
llvm::sys::PrintStackTrace(llvm::raw_ostream&) + 37
1  clang-7                  0x000000010a9e274e SignalHandler(int) + 192
2  libsystem_platform.dylib 0x00007fff6e56ab3d _sigtramp + 29
3  libsystem_platform.dylib 0x00007ffee61e1597 _sigtramp + 2009557623
4  clang-7                  0x000000010bc0dbf6 clang::TypeLoc::getBeginLoc()
const + 118
5  clang-7                  0x000000010bbd3437
clang::NestedNameSpecifierLoc::getLocalSourceRange() const + 143
6  clang-7                  0x000000010b62698d
clang::CXXScopeSpec::getLastQualifierNameLoc() const + 37
[...]


Interestingly, this happens *after* the correct error message is printed. Also,
I am unable to reproduce it on Godbolt or my Linux machines.

clang version 7.0.0 (tags/RELEASE_700/final)
Target: x86_64-apple-darwin18.2.0
Thread model: posix
InstalledDir: /usr/local/opt/llvm/bin
(Installed via brew)</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>