[PATCH] D67247: Added missing unqualified name lookup of operator overloads for fold expressions

2019-09-05 Thread Jonathan Meier via Phabricator via cfe-commits
jonathanmeier created this revision. jonathanmeier added reviewers: clang, rsmith. Herald added a project: clang. Herald added a subscriber: cfe-commits. Valid operator overloads for fold expressions are not found in the current scope, since unqualified name lookup is not performed. This is a

[PATCH] D67460: clang-tidy: modernize-use-using work with multi-argument templates

2019-09-11 Thread Jonathan Meier via Phabricator via cfe-commits
jonathanmeier added a comment. With non-type template parameters we can have expressions inside template arguments, including comparison operators like `<`, `<=`, `>` and `>=`, which lets us write typedefs like this: template struct S {}; typedef S<(0 < 0)> S_t, *S_p; Unfortunately,

[PATCH] D67460: clang-tidy: modernize-use-using work with multi-argument templates

2019-09-12 Thread Jonathan Meier via Phabricator via cfe-commits
jonathanmeier added a comment. Unfortunately, only considering parenthesis (`l_paren`, `r_paren`) is not sufficient. We need to consider all the nesting tokens, including brackets (`l_square`, `r_square`) and braces (`l_brace`, `r_brace`), since the Standard says (C++ 17 Draft N4659, Section

[PATCH] D67460: clang-tidy: modernize-use-using work with multi-argument templates

2019-09-12 Thread Jonathan Meier via Phabricator via cfe-commits
jonathanmeier added a comment. Also note that your enhanced version of my first example actually works with your initial patch, since the two comparison operators cancel each other out in the counting logic. Repository: rCTE Clang Tools Extra CHANGES SINCE LAST ACTION

[PATCH] D67460: clang-tidy: modernize-use-using work with multi-argument templates

2019-09-12 Thread Jonathan Meier via Phabricator via cfe-commits
jonathanmeier added a comment. Nice! I don't have commit access, so we'll need someone else have another look. @alexfh, since you previously worked on this, would you mind taking a look at this patch? Repository: rCTE Clang Tools Extra CHANGES SINCE LAST ACTION

[PATCH] D67460: clang-tidy: modernize-use-using work with multi-argument templates

2019-09-12 Thread Jonathan Meier via Phabricator via cfe-commits
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

[PATCH] D67247: Added missing unqualified name lookup of operator overloads for fold expressions

2019-09-16 Thread Jonathan Meier via Phabricator via cfe-commits
jonathanmeier added a comment. ping @rsmith Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D67247/new/ https://reviews.llvm.org/D67247 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D69276: Add missing assertions in testcase

2019-10-21 Thread Jonathan Meier via Phabricator via cfe-commits
jonathanmeier created this revision. jonathanmeier added reviewers: clang, rsmith. Herald added a project: clang. Herald added a subscriber: cfe-commits. Add two missing assertions for testcases introduced in rL373874 . Repository: rG LLVM Github Monorepo

[PATCH] D67247: Added missing unqualified name lookup of operator overloads for fold expressions

2019-10-21 Thread Jonathan Meier via Phabricator via cfe-commits
jonathanmeier updated this revision to Diff 225928. jonathanmeier changed the repository for this revision from rC Clang to rG LLVM Github Monorepo. jonathanmeier added a comment. - Rebased to adapt to the latest changes for spaceship operator and comparison operator rewrite support in rL375305

[PATCH] D68682: Clang-tidy fix removals removing all non-blank text from a line should remove the line

2019-10-11 Thread Jonathan Meier via Phabricator via cfe-commits
jonathanmeier added a comment. In D68682#1702025 , @poelmanc wrote: > In D68682#1700908 , @Eugene.Zelenko > wrote: > > > You may be interested to also look on PR43583 related to > >