[clang] [clang] Update typechecking of builtin elementwise ternary math operators (PR #155620)
via cfe-commits
cfe-commits at lists.llvm.org
Wed Aug 27 17:50:32 PDT 2025
================
@@ -15905,13 +15957,11 @@ Sema::BuiltinVectorMath(CallExpr *TheCall,
SourceLocation LocA = Args[0]->getBeginLoc();
QualType TyA = Args[0]->getType();
- QualType TyB = Args[1]->getType();
if (checkMathBuiltinElementType(*this, LocA, TyA, ArgTyRestr, 1))
return std::nullopt;
- if (!Context.hasSameUnqualifiedType(TyA, TyB)) {
- Diag(LocA, diag::err_typecheck_call_different_arg_types) << TyA << TyB;
+ if (checkBuiltinVectorMathArgTypes(*this, 2, Args)) {
return std::nullopt;
}
----------------
Sirraide wrote:
```suggestion
if (checkBuiltinVectorMathArgTypes(*this, 2, Args))
return std::nullopt;
```
https://github.com/llvm/llvm-project/pull/155620
More information about the cfe-commits
mailing list