Anastasia added a comment. It looks good, I was just thinking whether it would be possible to share more common infrastructure. There is `Sema::CheckVectorOperands` that corresponding OpenCL methods are using internally. Do you think it is possible to share the code more?
================ Comment at: clang/include/clang/Basic/DiagnosticSemaKinds.td:6880 +def err_conditional_vector_has_void : Error< + "GNU vector conditional operand cannot be %select{void|a throw expression}0">; +def err_conditional_vector_operand_type ---------------- Would this only apply to GNU extension? I am just wondering if this can be generalized. ================ Comment at: clang/lib/Sema/SemaExprCXX.cpp:5797 + // If both are vector types, they must be the same type. + if (!Context.hasSameType(LHSType, RHSType)) { + Diag(QuestionLoc, diag::err_conditional_vector_mismatched_vectors) ---------------- Don't we already have a diagnostic for this used in OpenCL? CHANGES SINCE LAST ACTION https://reviews.llvm.org/D71463/new/ https://reviews.llvm.org/D71463 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits