eduucaldas added a reviewer: gribozavr2. eduucaldas added a comment. 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. ================ Comment at: clang/unittests/Tooling/Syntax/TreeTest.cpp:186-187 + auto AnnotatedRanges = AnnotatedCode.ranges(); + assert(AnnotatedRanges.size() == TreeDumps.size()); + for (auto i = 0u; i < AnnotatedRanges.size(); i++) { + auto *AnnotatedNode = nodeByRange(AnnotatedRanges[i], Root); ---------------- 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? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D85713/new/ https://reviews.llvm.org/D85713 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits