Details
Details
- Reviewers
gribozavr2
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Comment Actions
A proposition, upon review I'll change other tests.
One concern is that we might lose coverage while reducing noise. But I'll take a look into that with calm when changing the tests.
clang/unittests/Tooling/Syntax/TreeTest.cpp | ||
---|---|---|
186–187 | I just wanted to do a for( auto [range, dump]& : zip(AnnotatedRanges,TreeDumps)) Is indexed loop the way to go in C++? |
clang/unittests/Tooling/Syntax/TreeTest.cpp | ||
---|---|---|
186–187 | Yes, I believe what you have now is indeed the best way. |
I just wanted to do a for( auto [range, dump]& : zip(AnnotatedRanges,TreeDumps))
Is indexed loop the way to go in C++?
And also I used 0u here because we make a comparison to std::vector::size_type, is there a less error-prone way of writing those loop indexes?