[llvm-bugs] [Bug 42108] New: locally created const reference template argument

via llvm-bugs llvm-bugs at lists.llvm.org
Mon Jun 3 01:26:46 PDT 2019


            Bug ID: 42108
           Summary: locally created const reference template argument
           Product: clang
           Version: trunk
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: Frontend
          Assignee: unassignedclangbugs at nondot.org
          Reporter: arbmind at gmail.com
                CC: llvm-bugs at lists.llvm.org, neeilans at live.com,
                    richard-llvm at metafoo.co.uk

This code crashes the clang frontend.

struct I {};
template<const I&>
void func() {}

auto testFunc() {
    return func<I{}>(); // crash

It's the same for struct/classes. See: https://clang.godbolt.org/z/W-izMz

The expected behavior:
* clang does not crash
* correct diagnostics message

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/20190603/0eabd873/attachment.html>

More information about the llvm-bugs mailing list