Skip to content

Commit d38c61a

Browse files
committed
[clang][Interp][NFC] Move ToVoid casts to the bottom
So we have all the complex casts together.
1 parent e96242b commit d38c61a

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

clang/lib/AST/Interp/ByteCodeExprGen.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -291,9 +291,6 @@ bool ByteCodeExprGen<Emitter>::VisitCastExpr(const CastExpr *CE) {
291291
case CK_FloatingComplexToReal:
292292
return this->emitComplexReal(SubExpr);
293293

294-
case CK_ToVoid:
295-
return discard(SubExpr);
296-
297294
case CK_IntegralRealToComplex:
298295
case CK_FloatingRealToComplex: {
299296
// We're creating a complex value here, so we need to
@@ -317,6 +314,9 @@ bool ByteCodeExprGen<Emitter>::VisitCastExpr(const CastExpr *CE) {
317314
return this->emitInitElem(T, 1, SubExpr);
318315
}
319316

317+
case CK_ToVoid:
318+
return discard(SubExpr);
319+
320320
default:
321321
assert(false && "Cast not implemented");
322322
}

0 commit comments

Comments
 (0)