[llvm-bugs] [Bug 41985] New: clang-cl crash with -Z7 / -Zi, variable templates and expression SFINAE (regression in 8.0.0)

via llvm-bugs llvm-bugs at lists.llvm.org
Wed May 22 12:43:53 PDT 2019


https://bugs.llvm.org/show_bug.cgi?id=41985

            Bug ID: 41985
           Summary: clang-cl crash with -Z7 / -Zi, variable templates and
                    expression SFINAE (regression in 8.0.0)
           Product: new-bugs
           Version: 8.0
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: new bugs
          Assignee: unassignedbugs at nondot.org
          Reporter: andreas.zapf at ableton.com
                CC: htmldeveloper at gmail.com, llvm-bugs at lists.llvm.org

Created attachment 21990
  --> https://bugs.llvm.org/attachment.cgi?id=21990&action=edit
Error output with backtrace

template<typename T>
using void_t = void;

template <typename T, typename = void>
const bool has_m = false;

template <typename T>
const bool has_m<T, void_t<decltype(T().m())>> = true;

struct X
{
  int m() const
  {
    return 0;
  }
};

bool crash()
{
  return has_m<X>;
}

Compiler invocation: clang-cl -std:c++14 -c -Z7 (or -Zi)

This compiles fine with clang-cl 7.0.1. With clang-cl 8.0.0 it compiles when
the -Z? option is omitted.

-- 
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/20190522/190140a5/attachment.html>


More information about the llvm-bugs mailing list