clang-tidy's modernize-use-using feature is great! But if it finds any commas that are not within parentheses, it won't create a fix. That means it won't change lines like:
typedef std::pair<int, int> Point;
to
using Point = std::pair<int, int>;
or even:
typedef std::map<std::string, Foo> MyMap;
typedef std::vector<int,MyCustomAllocator<int>> MyVector;
This patch allows the fix to apply to lines with commas if they are within parentheses or angle brackets that were not themselves within parentheses. Three tests included, latter due to jonathanmeier's reply.
(Also one additional line auto Diag = diag... was accidentally clang-formatted by my editor but it seemed like a clear improvement so I left it in.)
Might as well use ++NestingLevel given that you don't care about the result anyway. Similar below.