[clang] [clang][Sema] Allow splat initialization of a sizeless vector in a C++ code (PR #205432)

Paul Osmialowski via cfe-commits cfe-commits at lists.llvm.org
Fri Jul 3 08:52:01 PDT 2026


================
@@ -8097,8 +8056,29 @@ bool Sema::CheckVectorCast(SourceRange R, QualType VectorTy, QualType Ty,
   return false;
 }
 
+static QualType getVectorElementType(ASTContext &Context, QualType VectorTy,
+                                     bool Unaltered) {
+  if (const auto *TyA = VectorTy->getAs<VectorType>())
+    return TyA->getElementType();
+  if (VectorTy->isSizelessVectorType()) {
+    if (Unaltered) {
----------------
pawosm-arm wrote:

Done

https://github.com/llvm/llvm-project/pull/205432


More information about the cfe-commits mailing list