[clang] [HLSL] error on out of bounds vector accesses (PR #128952)
Chris B via cfe-commits
cfe-commits at lists.llvm.org
Thu Feb 27 07:09:40 PST 2025
================
@@ -10635,6 +10635,12 @@ def err_block_on_vm : Error<
def err_sizeless_nonlocal : Error<
"non-local variable with sizeless type %0">;
+def err_vector_index_out_of_range : Error<
+ "vector element index %0 is out of bounds">;
+def warn_vector_index_out_of_range : Warning<
+ "vector element index %0 is out of bounds">,
----------------
llvm-beanz wrote:
Since these share the same text we can just have them refer to each other.
```suggestion
"vector element index %0 is out of bounds">;
def warn_vector_index_out_of_range : Warning<
err_vector_index_out_of_range.Summary>,
```
https://github.com/llvm/llvm-project/pull/128952
More information about the cfe-commits
mailing list