[clang] [HLSL] Add bounds checks for the HLSL `fmod` vector arguments and return types (PR #131035)
Sarah Spall via cfe-commits
cfe-commits at lists.llvm.org
Thu Mar 13 18:52:52 PDT 2025
================
@@ -58,9 +58,7 @@ constexpr vector<T, L> reflect_vec_impl(vector<T, L> I, vector<T, L> N) {
#endif
}
-template <typename T>
-constexpr enable_if_t<is_same<float, T>::value || is_same<half, T>::value, T>
-fmod_impl(T X, T Y) {
+template <typename T> constexpr T fmod_impl(T X, T Y) {
----------------
spall wrote:
> Not sure I understand the question—are you asking if this line still needs to be a template? We don't know if it's being passed a float or half from `hlsl_intrinsics.h` so I think it has to be.
Yeah thanks I think that answers my question.
https://github.com/llvm/llvm-project/pull/131035
More information about the cfe-commits
mailing list