File tree Expand file tree Collapse file tree 1 file changed +13
-23
lines changed Expand file tree Collapse file tree 1 file changed +13
-23
lines changed Original file line number Diff line number Diff line change @@ -2922,32 +2922,22 @@ bool Compiler<Emitter>::VisitCompoundLiteralExpr(const CompoundLiteralExpr *E) {
29222922 if (T && !E->isLValue ()) {
29232923 // For primitive types, we just visit the initializer.
29242924 return this ->delegate (Init);
2925- } else {
2926- unsigned LocalIndex;
2927-
2928- if (T)
2929- LocalIndex = this ->allocateLocalPrimitive (Init, *T, /* IsConst=*/ false );
2930- else if (std::optional<unsigned > MaybeIndex = this ->allocateLocal (Init))
2931- LocalIndex = *MaybeIndex;
2932- else
2933- return false ;
2925+ }
29342926
2935- if (!this ->emitGetPtrLocal (LocalIndex, E))
2936- return false ;
2927+ unsigned LocalIndex;
2928+ if (T)
2929+ LocalIndex = this ->allocateLocalPrimitive (Init, *T, /* IsConst=*/ false );
2930+ else if (std::optional<unsigned > MaybeIndex = this ->allocateLocal (Init))
2931+ LocalIndex = *MaybeIndex;
2932+ else
2933+ return false ;
29372934
2938- if (T) {
2939- if (!this ->visit (Init)) {
2940- return false ;
2941- }
2942- return this ->emitInit (*T, E);
2943- } else {
2944- if (!this ->visitInitializer (Init) || !this ->emitFinishInit (E))
2945- return false ;
2946- }
2947- return true ;
2948- }
2935+ if (!this ->emitGetPtrLocal (LocalIndex, E))
2936+ return false ;
29492937
2950- return false ;
2938+ if (T)
2939+ return this ->visit (Init) && this ->emitInit (*T, E);
2940+ return this ->visitInitializer (Init) && this ->emitFinishInit (E);
29512941}
29522942
29532943template <class Emitter >
You can’t perform that action at this time.
0 commit comments