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: [email protected]
          Reporter: [email protected]
                CC: [email protected], [email protected]

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.
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to