Xamarin Public Jenkins (auto-signing) 468663ddbb Imported Upstream version 6.10.0.49
Former-commit-id: 1d6753294b2993e1fbf92de9366bb9544db4189b
2020-01-16 16:38:04 +00:00

28 lines
559 B
ReStructuredText

.. title:: clang-tidy - readability-misplaced-array-index
readability-misplaced-array-index
=================================
This check warns for unusual array index syntax.
The following code has unusual array index syntax:
.. code-block:: c++
void f(int *X, int Y) {
Y[X] = 0;
}
becomes
.. code-block:: c++
void f(int *X, int Y) {
X[Y] = 0;
}
The check warns about such unusual syntax for readability reasons:
* There are programmers that are not familiar with this unusual syntax.
* It is possible that variables are mixed up.