[clang] e0b66a4 - [clang][Interp][NFC] Loosen an assertion

Timm Bäder via cfe-commits cfe-commits at lists.llvm.org
Wed Jun 19 09:31:56 PDT 2024


Author: Timm Bäder
Date: 2024-06-19T18:31:25+02:00
New Revision: e0b66a4d6848dae2a03e4a17292b501c01baa009

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

LOG: [clang][Interp][NFC] Loosen an assertion

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 61a7394854d40..06e54e4baaaf5 100644
--- a/clang/lib/AST/Interp/ByteCodeExprGen.cpp
+++ b/clang/lib/AST/Interp/ByteCodeExprGen.cpp
@@ -2838,7 +2838,9 @@ template <class Emitter>
 bool ByteCodeExprGen<Emitter>::VisitExtVectorElementExpr(
     const ExtVectorElementExpr *E) {
   const Expr *Base = E->getBase();
-  assert(Base->getType()->isVectorType());
+  assert(
+      Base->getType()->isVectorType() ||
+      Base->getType()->getAs<PointerType>()->getPointeeType()->isVectorType());
 
   SmallVector<uint32_t, 4> Indices;
   E->getEncodedElementAccess(Indices);


        


More information about the cfe-commits mailing list