[clang-tools-extra] [clang-tidy] In C++17, callee is guaranteed to be sequenced before arguments. (PR #93623)

Kefu Chai via cfe-commits cfe-commits at lists.llvm.org
Tue May 28 16:46:14 PDT 2024


tchaikov wrote:

@martinboehme hello Martin, I resurrected your change at https://reviews.llvm.org/D145581?id=503330#inline-1406063 and posted here in hope that we can continue your efforts and finally land the change in main branch. Hope you don't mind that I created this without your permission. we are also using clang-tidy in our project, since we are using the chained expression like `v.foo(x, y).then(std::move(x)).then(std::move(v))` a lot, it's a little bit annoying that clang-tidy warns at seeing this. this reduces the signal-to-noise ratio of its output. 

On top of your change, I made following changes

- rebase onto the latest main HEAD
- s/const auto &Succ/const CFGBlock *Succ/, so it is more explicit that the element type is a pointer.
- use `Visited.Contains(e)` instead of `!Visited.count(e)`, for better readability
- rename `found` to `Found`, to be more consistent with the naming convention in LLVM
- check for null before pushing a new successor node to `Stack`, otherwise we could be iterating a "null" node's successors.

these changes are collected in a separate commit in this PR, if you are good with them, I will fold it into the first commit.

https://github.com/llvm/llvm-project/pull/93623


More information about the cfe-commits mailing list