gribozavr marked 4 inline comments as done.
gribozavr added inline comments.


================
Comment at: clang-tools-extra/clangd/index/IndexAction.cpp:217
   std::unique_ptr<CanonicalIncludes> Includes;
+  index::IndexingOptions Opts;
   std::unique_ptr<CommentHandler> PragmaHandler;
----------------
ilya-biryukov wrote:
> Are these option ever used? Do we need to keep them alive for the lifetime of 
> the action?
> Might be worth a comment.
They are passed in through the constructor, and consumed by 
`index::createIndexingASTConsumer` in `CreateASTConsumer`. So they need to be 
stored in a member variable between those two calls.


================
Comment at: clang-tools-extra/clangd/unittests/SymbolCollectorTests.cpp:227
+      std::shared_ptr<index::IndexDataConsumer> DataConsumer;
+      index::IndexingOptions Opts;
       CommentHandler *PragmaHandler;
----------------
ilya-biryukov wrote:
> Same here, we do not seem to use `Opts`, but still store them. To keep them 
> alive?
Same as in the other comment -- `Opts` are passed in through the constructor of 
`IndexAction`, and consumed in `IndexAction::CreateASTConsumer`.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D66878/new/

https://reviews.llvm.org/D66878



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

Reply via email to