Skip to content

Segfault in SROA while using the overload deduction guide pattern and copy capture #40117

@llvmbot

Description

@llvmbot
Bugzilla Link 40771
Resolution FIXED
Resolved on Jul 29, 2019 01:56
Version trunk
OS Linux
Blocks #41819
Reporter LLVM Bugzilla Contributor
CC @adrian-prantl,@dexonsmith,@zmodem,@joker-eph,@LebedevRI,@oystedal,@zygoloid

Extended Description

Godbolt demonstrating the issue: https://godbolt.org/z/Vs3QZe

Clang options: -std=c++17 -O1

#include

template <class... Ts> struct ctad : Ts... {};
template <class... Ts> ctad(Ts...)->ctad<Ts...>;

void crash()
{
std::string s;
ctad c {s{}, s{}};
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugzillaIssues migrated from bugzillaclangClang issues not falling into any other category

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions