[clang] [HLSL] Add bounds checks for the hlsl vector arguments and return types (PR #130724)
Sarah Spall via cfe-commits
cfe-commits at lists.llvm.org
Tue Mar 11 09:25:57 PDT 2025
================
@@ -45,6 +45,10 @@ template <typename T> struct is_arithmetic {
static const bool Value = __is_arithmetic(T);
};
+template <typename T, int N>
+using HLSL_FIXED_VECTOR =
+ vector<__detail::enable_if_t<(N > 1 && N <= 4), T>, N>;
----------------
spall wrote:
should the enable_if_t not go around the entire vector<T,N>, instead of within the T part?
https://github.com/llvm/llvm-project/pull/130724
More information about the cfe-commits
mailing list