modernize-loop-convert handles array-like objects like vectors fairly well, but strips slightly too much information from the iteration expression by converting:
Vector<Vector<int>> X; for (int J = 0; J < X[5].size(); ++J) copyArg(X[5][J]);
to
Vector<Vector<int>> X; for (int J : X) // should be for (int J : X[5]) copyArg(J);
The [5] is a call to operator[] and gets stripped by LoopConvertCheck::getContainerString. This patch fixes that and adds several test cases.
Not essential, but how would this handle iterating the lowest dimension.
Though I may have a feeling the check won't even try to convert that. If so disregard this comment.