steakhal added inline comments.
================ Comment at: clang/lib/Analysis/CFG.cpp:1819-1826 + for (std::size_t idx = 1, count = LocalScopeEndMarkers.size(); idx < count; + ++idx) { + LocalScope::const_iterator B = LocalScopeEndMarkers[idx]; + LocalScope::const_iterator E = LocalScopeEndMarkers[idx - 1]; + if (!B.inSameLocalScope(E)) + addScopeExitHandling(B, E, S); + addAutomaticObjDestruction(B, E, S); ---------------- How about using a "pairwise" range here? I believe, we don't have that just yet, but we can use `zip` instead. ================ Comment at: clang/lib/Analysis/CFG.cpp:1844-1846 + for (LocalScope::const_iterator I = B; I != E; ++I) + if (!hasTrivialDestructor(*I)) + DeclsNonTrivial.push_back(*I); ---------------- We could use `llvm::make_range(B, E)` here, I believe. ================ Comment at: clang/lib/Analysis/CFG.cpp:1901-1903 + for (LocalScope::const_iterator I = B; I != E; ++I) if (hasTrivialDestructor(*I)) DeclsTrivial.push_back(*I); ---------------- Ranges here too. ================ Comment at: clang/lib/Analysis/CFG.cpp:1936-1938 + for (LocalScope::const_iterator I = DstPos; I != BasePos; ++I) + if (I.pointsToFirstDeclaredVar()) + appendScopeBegin(Block, *I, S); ---------------- Probably, we could also use a `llvm::make_range(DstPos, BasePos)` here, but I'm not sure if that's more readable or not. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D153273/new/ https://reviews.llvm.org/D153273 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits