malaperle-ericsson added inline comments.

================
Comment at: clangd/ClangdUnit.cpp:276
+class DeclarationLocationsFinder : public index::IndexDataConsumer {
+  std::unique_ptr<std::vector<Location>> DeclarationLocations;
+  const SourceLocation &SearchedLocation;
----------------
ilya-biryukov wrote:
> Why do we need to use `unique_ptr<vector<Location>>` here and in other places 
> instead of `vector<Location>`? 
It was to implement "takeLocations". Calling it claims ownship of the vector. 
Did you have something else in mind when you suggested to implement 
takeLocations with a std::move? Disclaimer: this c++11 stuff is all new to me 
so I wouldn't be surprised if I'm doing it in a terrible way.


https://reviews.llvm.org/D34269



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to