File tree 2 files changed +8
-6
lines changed
2 files changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -1848,6 +1848,8 @@ bool ByteCodeExprGen<Emitter>::VisitCXXConstructExpr(
1848
1848
1849
1849
// Immediately call the destructor if we have to.
1850
1850
if (DiscardResult) {
1851
+ if (!this ->emitRecordDestruction (getRecord (E->getType ())))
1852
+ return false ;
1851
1853
if (!this ->emitPopPtr (E))
1852
1854
return false ;
1853
1855
}
Original file line number Diff line number Diff line change @@ -335,9 +335,9 @@ namespace InitializerTemporaries {
335
335
};
336
336
337
337
constexpr int f () {
338
- S{}; // ref-note {{in call to 'S{}.~S()'}}
339
- // / FIXME: Wrong source location below.
340
- return 12 ; // expected-note {{in call to '&S{}->~S()'}}
338
+ S{}; // ref-note {{in call to 'S{}.~S()'}} \
339
+ // expected-note {{in call to '&S{}->~S()'}}
340
+ return 12 ;
341
341
}
342
342
static_assert (f() == 12); // both-error {{not an integral constant expression}} \
343
343
// both-note {{in call to 'f()'}}
@@ -604,9 +604,9 @@ namespace Destructors {
604
604
}
605
605
};
606
606
constexpr int testS () {
607
- S{}; // ref-note {{in call to 'S{}.~S()'}}
608
- return 1 ; // expected-note {{in call to '&S{}->~S()'}}
609
- // FIXME: ^ Wrong line
607
+ S{}; // ref-note {{in call to 'S{}.~S()'}} \
608
+ // expected-note {{in call to '&S{}->~S()'}}
609
+ return 1 ;
610
610
}
611
611
static_assert (testS() == 1 ); // both-error {{not an integral constant expression}} \
612
612
// both-note {{in call to 'testS()'}}
You can’t perform that action at this time.
0 commit comments