File tree Expand file tree Collapse file tree 2 files changed +8
-9
lines changed Expand file tree Collapse file tree 2 files changed +8
-9
lines changed Original file line number Diff line number Diff line change @@ -243,22 +243,14 @@ bool ByteCodeExprGen<Emitter>::VisitBinaryOperator(const BinaryOperator *BO) {
243
243
std::optional<PrimType> RT = classify (RHS->getType ());
244
244
std::optional<PrimType> T = classify (BO->getType ());
245
245
246
- auto Discard = [this , T, BO](bool Result) {
247
- if (!Result)
248
- return false ;
249
- return DiscardResult ? this ->emitPop (*T, BO) : true ;
250
- };
251
-
252
246
// Deal with operations which have composite or void types.
253
247
if (BO->isCommaOp ()) {
254
248
if (!this ->discard (LHS))
255
249
return false ;
256
250
if (RHS->getType ()->isVoidType ())
257
251
return this ->discard (RHS);
258
252
259
- // Otherwise, visit RHS and optionally discard its value.
260
- return Discard (Initializing ? this ->visitInitializer (RHS)
261
- : this ->visit (RHS));
253
+ return this ->delegate (RHS);
262
254
}
263
255
264
256
if (!LT || !RT || !T)
@@ -285,6 +277,12 @@ bool ByteCodeExprGen<Emitter>::VisitBinaryOperator(const BinaryOperator *BO) {
285
277
return true ;
286
278
};
287
279
280
+ auto Discard = [this , T, BO](bool Result) {
281
+ if (!Result)
282
+ return false ;
283
+ return DiscardResult ? this ->emitPop (*T, BO) : true ;
284
+ };
285
+
288
286
switch (BO->getOpcode ()) {
289
287
case BO_EQ:
290
288
return MaybeCastToBool (this ->emitEQ (*LT, BO));
Original file line number Diff line number Diff line change @@ -929,6 +929,7 @@ namespace DiscardExprs {
929
929
(bool )1 ;
930
930
__null;
931
931
__builtin_offsetof (A, a);
932
+ 1 ,2 ;
932
933
933
934
return 0 ;
934
935
}
You can’t perform that action at this time.
0 commit comments