[llvm-bugs] [Bug 32598] New: SIGSEGV on recursive templates

via llvm-bugs llvm-bugs at lists.llvm.org
Mon Apr 10 10:36:55 PDT 2017


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

            Bug ID: 32598
           Summary: SIGSEGV on recursive templates
           Product: clang
           Version: 4.0
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: C++
          Assignee: unassignedclangbugs at nondot.org
          Reporter: vanyacpp at gmail.com
                CC: dgregor at apple.com, llvm-bugs at lists.llvm.org

clang 4.0 crashes on this code:

template<class Predicate, typename T>
auto accept() -> decltype(Predicate::template requires<T>());

struct TypePredicate
{
        template<class T>
        static auto requires() -> decltype(accept<TypePredicate, T>());
};

void bar()
{
        accept<TypePredicate, int>();
}

Previous compiler versions correctly showed an error on this code.

-- 
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/20170410/2b695e05/attachment-0001.html>


More information about the llvm-bugs mailing list