We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 559c9fb commit 7a2b425Copy full SHA for 7a2b425
clang/lib/CodeGen/CGExprAgg.cpp
@@ -562,16 +562,6 @@ void AggExprEmitter::VisitInitListExpr(InitListExpr *E) {
562
unsigned NumInitElements = E->getNumInits();
563
RecordDecl *SD = E->getType()->getAs<RecordType>()->getDecl();
564
565
- // If we're initializing the whole aggregate, just do it in place.
566
- // FIXME: This is a hack around an AST bug (PR6537).
567
- if (NumInitElements == 1 && E->getType() == E->getInit(0)->getType()) {
568
- EmitInitializationToLValue(E->getInit(0),
569
- CGF.MakeAddrLValue(DestPtr, E->getType()),
570
- E->getType());
571
- return;
572
- }
573
-
574
575
if (E->getType()->isUnionType()) {
576
// Only initialize one field of a union. The field itself is
577
// specified by the initializer list.
0 commit comments