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

            Bug ID: 40790
           Summary: Crash when compiling template specialization with auto
                    return type
           Product: clang
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected], [email protected],
                    [email protected], [email protected],
                    [email protected]

At least the version 5.0 and all version upwards are affected.

Here is a small test case example:

template <typename T>
T foo(int payload);

struct Bar
{ };

template <>
auto foo(int payload)
{
    Bar result;
    return result;
}

Yes, this code has an error but the compiler should emit an error message
instead of crashing.

-- 
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