[llvm-bugs] [Bug 40790] New: Crash when compiling template specialization with auto return type
    via llvm-bugs 
    llvm-bugs at lists.llvm.org
       
    Wed Feb 20 08:53:22 PST 2019
    
    
  
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: unassignedclangbugs at nondot.org
          Reporter: devgs at ukr.net
                CC: blitzrakete at gmail.com, dgregor at apple.com,
                    erik.pilkington at gmail.com, llvm-bugs at lists.llvm.org,
                    richard-llvm at metafoo.co.uk
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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20190220/fc036820/attachment.html>
    
    
More information about the llvm-bugs
mailing list