[clang] Implement lifetime analysis for lifetime_capture_by(X) (#115921)
[llvm-project.git] / clang / test / SemaCXX / matrix-index-operator-sign-conversion.cpp
blobe6fe4a6c57ff221efdc416643a8cc4ceb6d9b94e
1 // RUN: %clang_cc1 -triple arm64-apple-macosx -std=c++11 -fenable-matrix -fsyntax-only -verify -Wsign-conversion %s
3 template <typename T, int R, int C> using m __attribute__((__matrix_type__(R,C))) = T;
5 double index1(m<double,3,1> X, int i) { return X[i][0]; }
7 double index2(m<double,3,1> X, unsigned i) { return X[i][0]; }
9 double index3(m<double,3,1> X, char i) { return X[i][0]; }
11 double index4(m<double,3,1> X, int i) { return X[0][i]; }
13 double index5(m<double,3,1> X, unsigned i) { return X[0][i]; }
15 double index6(m<double,3,1> X, char i) { return X[0][i]; }
17 // expected-no-diagnostics