[PATCH] D67460: clang-tidy: modernize-use-using work with multi-argument templates
Jonathan Meier via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Sep 12 13:17:07 PDT 2019
jonathanmeier added a comment.
Thanks, this looks much better now. I think there's no need to track nesting of parenthesis, brackets and braces separately, so we can collapse `ParenLevel`, `BraceLevel` and `SquareBracketLevel` into a single `NestingLevel`, which simplifies all the conditions quite a bit.
Also consider adding a few more testcases, especially with nested templates and multiple template arguments (the reason for this patch, after all! ;-) ). You can easily test (different numbers of) multiple template arguments by just adding a few more template parameters with default arguments to e.g. `TwoArgTemplate`, `S` or `Q`.
================
Comment at: clang-tools-extra/clang-tidy/modernize/UseUsingCheck.cpp:90
+ AngleBracketLevel == 0) {
+ // If there is comma not nested then it is two or more declarations in this chain.
return false;
----------------
change to `If there is a non-nested comma we have two or more declarations in this chain.`
Repository:
rCTE Clang Tools Extra
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D67460/new/
https://reviews.llvm.org/D67460
More information about the cfe-commits
mailing list