================ @@ -2079,6 +2079,14 @@ static bool CheckFloatingOrIntRepresentation(Sema *S, CallExpr *TheCall) { checkAllSignedTypes); } +static bool CheckBoolRepresentation(Sema *S, CallExpr *TheCall) { + auto checkAllBoolTypes = [](clang::QualType PassedType) -> bool { + return !PassedType->hasIntegerRepresentation(); ---------------- llvm-beanz wrote:
No, this is not correct. You want to check that the argument is either a `bool` type or a vector with element of `bool` type. You'll want to use `S->Context.hasSameUnqualifiedType( S->Context.BoolTy, ...);`, and if the parameter is a vector you need to look at the element type. https://github.com/llvm/llvm-project/pull/127098 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits