https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/191662
None >From d01ac84ced71bff6fa133a9f194bbbfbd8f4ba81 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= <[email protected]> Date: Sat, 11 Apr 2026 22:11:30 +0200 Subject: [PATCH] [clang][bytecode] Fix implicit-cast-complex-to-vector test --- clang/lib/AST/ByteCode/Compiler.cpp | 4 +++- clang/test/Sema/implicit-cast-complex-to-vector.c | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/clang/lib/AST/ByteCode/Compiler.cpp b/clang/lib/AST/ByteCode/Compiler.cpp index 4f517266336f2..15651b9de9e91 100644 --- a/clang/lib/AST/ByteCode/Compiler.cpp +++ b/clang/lib/AST/ByteCode/Compiler.cpp @@ -703,9 +703,11 @@ bool Compiler<Emitter>::VisitCastExpr(const CastExpr *E) { case CK_VectorSplat: { assert(!canClassify(E->getType())); - assert(canClassify(SubExpr->getType())); assert(E->getType()->isVectorType()); + if (!canClassify(SubExpr->getType())) + return false; + if (!Initializing) { UnsignedOrNone LocalIndex = allocateLocal(E); if (!LocalIndex) diff --git a/clang/test/Sema/implicit-cast-complex-to-vector.c b/clang/test/Sema/implicit-cast-complex-to-vector.c index 4b91c96c6f34e..279bc60d69b68 100644 --- a/clang/test/Sema/implicit-cast-complex-to-vector.c +++ b/clang/test/Sema/implicit-cast-complex-to-vector.c @@ -1,4 +1,5 @@ // RUN: %clang_cc1 -fsyntax-only -verify=c %s +// RUN: %clang_cc1 -fsyntax-only -verify=c %s -fexperimental-new-constant-interpreter // RUN: %clang_cc1 -x c++ -fsyntax-only -verify=cxx %s typedef char __attribute__((__vector_size__(64))) V; _______________________________________________ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
