[clang] 773b468 - [clang][Interp][NFC] Add a TODO comment

Timm Bäder via cfe-commits cfe-commits at lists.llvm.org
Fri Oct 14 01:22:14 PDT 2022


Author: Timm Bäder
Date: 2022-10-14T10:21:52+02:00
New Revision: 773b468543c8c5f0a226c0757a503cb9a40650a5

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

LOG: [clang][Interp][NFC] Add a TODO comment

We can ignore casts where FromT and ToT are the same type. But that's a
performance optimization that I'd like to do later. For now, this code
is doing the right thing.

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 9264357c568a3..e23727aad256e 100644
--- a/clang/lib/AST/Interp/ByteCodeExprGen.cpp
+++ b/clang/lib/AST/Interp/ByteCodeExprGen.cpp
@@ -127,6 +127,7 @@ bool ByteCodeExprGen<Emitter>::VisitCastExpr(const CastExpr *CE) {
     if (!this->Visit(SubExpr))
       return false;
 
+    // TODO: Emit this only if FromT != ToT.
     return this->emitCast(*FromT, *ToT, CE);
   }
 


        


More information about the cfe-commits mailing list