================ @@ -2074,6 +2083,19 @@ bool SemaHLSL::CheckBuiltinFunctionCall(unsigned BuiltinID, CallExpr *TheCall) { return true; break; } + case Builtin::BI__builtin_hlsl_elementwise_splitdouble: { + if (SemaRef.checkArgCount(TheCall, 3)) + return true; + + if (CheckScalarOrVector(&SemaRef, TheCall, SemaRef.Context.DoubleTy, 0) || + CheckScalarOrVector(&SemaRef, TheCall, SemaRef.Context.UnsignedIntTy, + 1) || + CheckScalarOrVector(&SemaRef, TheCall, SemaRef.Context.UnsignedIntTy, + 2)) + return true; ---------------- tex3d wrote:
I just realized that we don't have tests for the `__builtin_hlsl_elementwise_splitdouble` operation for these diagnostics. I think we need checks similar to those found in `clang/test/Sema/builtins-elementwise-math.c` but in a new test under `clang/test/SemaHLSL/BuiltIns/`. https://github.com/llvm/llvm-project/pull/109331 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits