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) {
2922
2922
if (T && !E->isLValue ()) {
2923
2923
// For primitive types, we just visit the initializer.
2924
2924
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
+ }
2934
2926
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 ;
2937
2934
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 ;
2949
2937
2950
- return false ;
2938
+ if (T)
2939
+ return this ->visit (Init) && this ->emitInit (*T, E);
2940
+ return this ->visitInitializer (Init) && this ->emitFinishInit (E);
2951
2941
}
2952
2942
2953
2943
template <class Emitter >
You can’t perform that action at this time.
0 commit comments