File tree Expand file tree Collapse file tree 3 files changed +6
-4
lines changed Expand file tree Collapse file tree 3 files changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -930,6 +930,7 @@ def SuperSubClassMismatch : DiagGroup<"super-class-method-mismatch">;
930930def OverridingMethodMismatch : DiagGroup<"overriding-method-mismatch">;
931931def VariadicMacros : DiagGroup<"variadic-macros">;
932932def VectorConversion : DiagGroup<"vector-conversion">; // clang specific
933+ def VectorOutOfRange : DiagGroup<"vector-out-of-range">;
933934def VexingParse : DiagGroup<"vexing-parse">;
934935def VLAUseStaticAssert : DiagGroup<"vla-extension-static-assert">;
935936def VLACxxExtension : DiagGroup<"vla-cxx-extension", [VLAUseStaticAssert]>;
Original file line number Diff line number Diff line change @@ -10638,7 +10638,8 @@ def err_sizeless_nonlocal : Error<
1063810638def err_vector_index_out_of_range : Error<
1063910639 "vector element index %0 is out of bounds">;
1064010640def warn_vector_index_out_of_range : Warning<
10641- "vector element index %0 is out of bounds">;
10641+ "vector element index %0 is out of bounds">,
10642+ InGroup<VectorOutOfRange>, DefaultIgnore;
1064210643
1064310644def err_vec_builtin_non_vector : Error<
1064410645 "%select{first two|all}1 arguments to %0 must be vectors">;
Original file line number Diff line number Diff line change 33export void fn1 () {
44 int2 A = {1 ,2 };
55 int X = A[-1 ];
6- // expected-error@-1 {{vector element index '-1' is out of bounds}}
6+ // expected-error@-1 {{vector element index -1 is out of bounds}}
77}
88
99export void fn2 () {
1010 int4 A = {1 ,2 ,3 ,4 };
1111 int X = A[4 ];
12- // expected-error@-1 {{vector element index '4' is out of bounds}}
12+ // expected-error@-1 {{vector element index 4 is out of bounds}}
1313}
1414
1515export void fn3 () {
1616 bool2 A = {true ,true };
1717 bool X = A[-1 ];
18- // expected-error@-1 {{vector element index '-1' is out of bounds}}
18+ // expected-error@-1 {{vector element index -1 is out of bounds}}
1919}
You can’t perform that action at this time.
0 commit comments