File tree Expand file tree Collapse file tree 1 file changed +9
-11
lines changed Expand file tree Collapse file tree 1 file changed +9
-11
lines changed Original file line number Diff line number Diff line change @@ -2949,19 +2949,17 @@ bool Compiler<Emitter>::VisitMaterializeTemporaryExpr(
29492949 if (!this ->emitSetLocal (*SubExprT, LocalIndex, E))
29502950 return false ;
29512951 return this ->emitGetPtrLocal (LocalIndex, E);
2952- } else {
2952+ }
29532953
2954- if (!this ->checkLiteralType (SubExpr))
2954+ if (!this ->checkLiteralType (SubExpr))
2955+ return false ;
2956+ const Expr *Inner = E->getSubExpr ()->skipRValueSubobjectAdjustments ();
2957+ if (UnsignedOrNone LocalIndex =
2958+ allocateLocal (E, Inner->getType (), E->getExtendingDecl ())) {
2959+ InitLinkScope<Emitter> ILS (this , InitLink::Temp (*LocalIndex));
2960+ if (!this ->emitGetPtrLocal (*LocalIndex, E))
29552961 return false ;
2956-
2957- const Expr *Inner = E->getSubExpr ()->skipRValueSubobjectAdjustments ();
2958- if (UnsignedOrNone LocalIndex =
2959- allocateLocal (E, Inner->getType (), E->getExtendingDecl ())) {
2960- InitLinkScope<Emitter> ILS (this , InitLink::Temp (*LocalIndex));
2961- if (!this ->emitGetPtrLocal (*LocalIndex, E))
2962- return false ;
2963- return this ->visitInitializer (SubExpr) && this ->emitFinishInit (E);
2964- }
2962+ return this ->visitInitializer (SubExpr) && this ->emitFinishInit (E);
29652963 }
29662964 return false ;
29672965}
You can’t perform that action at this time.
0 commit comments