================
@@ -3796,11 +3796,11 @@ static bool CheckNoDoubleVectors(Sema *S,
SourceLocation Loc, int ArgOrdinal,
return false;
}
-static bool CheckFloatingOrIntRepresentation(Sema *S, SourceLocation Loc,
- int ArgOrdinal,
- clang::QualType PassedType) {
- if (!PassedType->hasIntegerRepresentation() &&
- !PassedType->hasFloatingRepresentation())
+static bool CheckFloatingOrNonBoolIntRepresentation(
+ Sema *S, SourceLocation Loc, int ArgOrdinal, clang::QualType PassedType) {
+ if (getScalarComponentType(PassedType)->isBooleanType() ||
+ (!PassedType->hasIntegerRepresentation() &&
+ !PassedType->hasFloatingRepresentation()))
----------------
djb wrote:
I included this fix because `__builtin_hlsl_elementwise_sign` would otherwise
accept boolean matrix (and vector) inputs. I'm happy to split this into a
separate PR if preferred, as it was a pre-existing issue for boolean vectors.
https://github.com/llvm/llvm-project/pull/235542
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits