File tree Expand file tree Collapse file tree 2 files changed +8
-6
lines changed Expand file tree Collapse file tree 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(
18481848
18491849 // Immediately call the destructor if we have to.
18501850 if (DiscardResult) {
1851+ if (!this ->emitRecordDestruction (getRecord (E->getType ())))
1852+ return false ;
18511853 if (!this ->emitPopPtr (E))
18521854 return false ;
18531855 }
Original file line number Diff line number Diff line change @@ -335,9 +335,9 @@ namespace InitializerTemporaries {
335335 };
336336
337337 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 ;
341341 }
342342 static_assert (f() == 12); // both-error {{not an integral constant expression}} \
343343 // both-note {{in call to 'f()'}}
@@ -604,9 +604,9 @@ namespace Destructors {
604604 }
605605 };
606606 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 ;
610610 }
611611 static_assert (testS() == 1 ); // both-error {{not an integral constant expression}} \
612612 // both-note {{in call to 'testS()'}}
You can’t perform that action at this time.
0 commit comments