Author: Timm Bäder
Date: 2024-01-23T15:02:08+01:00
New Revision: d38c61a13d89ec57b80e5174029b63071c6d7290

URL: 
https://github.com/llvm/llvm-project/commit/d38c61a13d89ec57b80e5174029b63071c6d7290
DIFF: 
https://github.com/llvm/llvm-project/commit/d38c61a13d89ec57b80e5174029b63071c6d7290.diff

LOG: [clang][Interp][NFC] Move ToVoid casts to the bottom

So we have all the complex casts together.

Added: 
    

Modified: 
    clang/lib/AST/Interp/ByteCodeExprGen.cpp

Removed: 
    


################################################################################
diff  --git a/clang/lib/AST/Interp/ByteCodeExprGen.cpp 
b/clang/lib/AST/Interp/ByteCodeExprGen.cpp
index 065182811326859..cfcef067b92bdc3 100644
--- a/clang/lib/AST/Interp/ByteCodeExprGen.cpp
+++ b/clang/lib/AST/Interp/ByteCodeExprGen.cpp
@@ -291,9 +291,6 @@ bool ByteCodeExprGen<Emitter>::VisitCastExpr(const CastExpr 
*CE) {
   case CK_FloatingComplexToReal:
     return this->emitComplexReal(SubExpr);
 
-  case CK_ToVoid:
-    return discard(SubExpr);
-
   case CK_IntegralRealToComplex:
   case CK_FloatingRealToComplex: {
     // We're creating a complex value here, so we need to
@@ -317,6 +314,9 @@ bool ByteCodeExprGen<Emitter>::VisitCastExpr(const CastExpr 
*CE) {
     return this->emitInitElem(T, 1, SubExpr);
   }
 
+  case CK_ToVoid:
+    return discard(SubExpr);
+
   default:
     assert(false && "Cast not implemented");
   }


        
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to