erichkeane added inline comments.
================ Comment at: clang/lib/Sema/SemaExprCXX.cpp:5951 const QualType EltTy = - cast<VectorType>(CondTy.getCanonicalType())->getElementType(); + CondTy->isVectorType() + ? cast<VectorType>(CondTy.getCanonicalType())->getElementType() ---------------- Why is this change necessary? Doesn't ExtVectorType inherit from VectorType? These should both be calling the same function here. ================ Comment at: clang/lib/Sema/SemaExprCXX.cpp:6012 } - ResultType = Context.getVectorType( - ResultElementTy, CondType->castAs<VectorType>()->getNumElements(), - VectorType::GenericVector); + if (std::is_same<VectorTy, ExtVectorType>::value) + ResultType = Context.getExtVectorType( ---------------- Oh boy, this is awkward as all heck... Makes me think we should instead have a templated function Context.getVectorType<VectorType>() or <ExtVectorType> ================ Comment at: clang/lib/Sema/SemaExprCXX.cpp:6144 + auto CondTy = Cond.get()->getType(); + if (CondTy->isExtVectorType()) + return CheckVectorConditionalTypes<ExtVectorType>(Cond, LHS, RHS, ---------------- Again I wonder why the 'if' here is necessary? Shouldn't just removing the 'error' diag in the call take care of this? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D98055/new/ https://reviews.llvm.org/D98055 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits