[clang] [HLSL] Add matrix support for isnan() and isinf() (PR #195586)
Dan Brown via cfe-commits
cfe-commits at lists.llvm.org
Tue Jul 28 23:15:13 PDT 2026
================
@@ -2200,7 +2200,8 @@ checkMathBuiltinElementType(Sema &S, SourceLocation Loc, QualType ArgTy,
switch (ArgTyRestr) {
case Sema::EltwiseBuiltinArgTyRestriction::None:
- if (!ArgTy->getAs<VectorType>() && !isValidMathElementType(ArgTy)) {
+ if (!ArgTy->getAs<VectorType>() && !ArgTy->getAs<MatrixType>() &&
+ !isValidMathElementType(ArgTy)) {
return S.Diag(Loc, diag::err_builtin_invalid_arg_type)
<< ArgOrdinal << /* vector */ 2 << /* integer */ 1 << /* fp */ 1
----------------
danbrown-amd wrote:
Changed in the diagnostic definition and applied to the FloatTy case.
https://github.com/llvm/llvm-project/pull/195586
More information about the cfe-commits
mailing list