ilya-biryukov added inline comments.
================ Comment at: clangd/index/Background.cpp:488 + Dependencies.push_back(std::move(ToVisit.front())); + auto &CurDependency = Dependencies.back(); + ToVisit.pop(); ---------------- ilya-biryukov wrote: > This reference makes it just as easy to access the vector we'll be modifying > inside the loop. > Can we avoid modifying the values inside the vector completely? I.e. ideally > we'll have only `push_back` into the vector and no modifications of the > internal references? > Ah, but we don't modify the vector anymore. Could you leave a comment that `Dependencies` is not modified further in the loop body, so it's fine to have a reference inside it? Repository: rCTE Clang Tools Extra CHANGES SINCE LAST ACTION https://reviews.llvm.org/D56656/new/ https://reviews.llvm.org/D56656 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits