You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[Matrix] Use 1st/2nd instead of first/second in matrix diags.
This was suggested in D72782 and brings the diagnostics more in line
with how argument references are handled elsewhere.
Reviewers: rjmccall, jfb, Bigcheese
Reviewed By: rjmccall
Differential Revision: https://reviews.llvm.org/D82473
Copy file name to clipboardExpand all lines: clang/test/Sema/matrix-type-builtins.c
+12-12Lines changed: 12 additions & 12 deletions
Original file line number
Diff line number
Diff line change
@@ -11,11 +11,11 @@ void transpose(sx5x10_t a, ix3x2_t b, dx3x3 c, int *d, int e) {
11
11
b=__builtin_matrix_transpose(b);
12
12
// expected-error@-1 {{assigning to 'ix3x2_t' (aka 'int __attribute__((matrix_type(3, 2)))') from incompatible type 'int __attribute__((matrix_type(2, 3)))'}}
13
13
__builtin_matrix_transpose(d);
14
-
// expected-error@-1 {{first argument must be a matrix}}
14
+
// expected-error@-1 {{1st argument must be a matrix}}
15
15
__builtin_matrix_transpose(e);
16
-
// expected-error@-1 {{first argument must be a matrix}}
16
+
// expected-error@-1 {{1st argument must be a matrix}}
17
17
__builtin_matrix_transpose("test");
18
-
// expected-error@-1 {{first argument must be a matrix}}
18
+
// expected-error@-1 {{1st argument must be a matrix}}
19
19
20
20
ix3x3m=__builtin_matrix_transpose(c);
21
21
// expected-error@-1 {{initializing 'ix3x3' (aka 'unsigned int __attribute__((matrix_type(3, 3)))') with an expression of incompatible type 'double __attribute__((matrix_type(3, 3)))'}}
// expected-error@-3 {{cannot initialize a variable of type 'char *' with an rvalue of type 'unsigned int __attribute__((matrix_type(3, 3)))'}}
16
16
17
17
__builtin_matrix_transpose(A);
18
-
// expected-error@-1 {{first argument must be a matrix}}
19
-
// expected-error@-2 {{first argument must be a matrix}}
20
-
// expected-error@-3 {{first argument must be a matrix}}
18
+
// expected-error@-1 {{1st argument must be a matrix}}
19
+
// expected-error@-2 {{1st argument must be a matrix}}
20
+
// expected-error@-3 {{1st argument must be a matrix}}
21
21
22
22
return__builtin_matrix_transpose(A.value);
23
23
// expected-error@-1 {{cannot initialize return object of type 'typename MyMatrix<unsigned int, 2U, 3U>::matrix_t' (aka 'unsigned int __attribute__((matrix_type(2, 3)))') with an rvalue of type 'unsigned int __attribute__((matrix_type(3, 2)))'}}
0 commit comments