llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT--> @llvm/pr-subscribers-clang Author: Timm Baeder (tbaederr) <details> <summary>Changes</summary> --- Full diff: https://github.com/llvm/llvm-project/pull/191662.diff 2 Files Affected: - (modified) clang/lib/AST/ByteCode/Compiler.cpp (+3-1) - (modified) clang/test/Sema/implicit-cast-complex-to-vector.c (+1) ``````````diff 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; `````````` </details> https://github.com/llvm/llvm-project/pull/191662 _______________________________________________ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
