mirror of
https://github.com/llvm/llvm-project.git
synced 2025-05-02 23:26:06 +00:00
Fix assert on temporary std::initializer_list.
llvm-svn: 182615
This commit is contained in:
parent
f632f69284
commit
be93c00ab3
@ -1159,12 +1159,13 @@ void AggExprEmitter::VisitInitListExpr(InitListExpr *E) {
|
||||
if (E->hadArrayRangeDesignator())
|
||||
CGF.ErrorUnsupported(E, "GNU array range designator extension");
|
||||
|
||||
AggValueSlot Dest = EnsureSlot(E->getType());
|
||||
|
||||
if (E->initializesStdInitializerList()) {
|
||||
EmitStdInitializerList(Dest.getAddr(), E);
|
||||
return;
|
||||
}
|
||||
|
||||
AggValueSlot Dest = EnsureSlot(E->getType());
|
||||
LValue DestLV = CGF.MakeAddrLValue(Dest.getAddr(), E->getType(),
|
||||
Dest.getAlignment());
|
||||
|
||||
|
@ -275,3 +275,13 @@ namespace rdar13325066 {
|
||||
for (X x : { x1, x2 }) { }
|
||||
}
|
||||
}
|
||||
|
||||
namespace dtors {
|
||||
struct S {
|
||||
S();
|
||||
~S();
|
||||
};
|
||||
void f() {
|
||||
std::initializer_list<S>{ S(), S() };
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user