sammccall accepted this revision.
sammccall added a comment.
This revision is now accepted and ready to land.

Nice, ship it!



================
Comment at: clangd/CodeComplete.cpp:317
+        if (Includes && !D->IncludeHeader.empty()) {
+          // Fallback to canonical header if declaration location is invalid.
+          auto Edit = [&]() -> Expected<Optional<TextEdit>> {
----------------
is this comment still relevant here?


================
Comment at: clangd/CodeComplete.cpp:792
+    if (!Style) {
+      log("Failed to get FormaStyle for file" + Input.FileName +
+          ". Fall back to use LLVM style. Error: " +
----------------
nit: FormatStyle 


================
Comment at: clangd/CodeComplete.cpp:803
+    
Clang->getPreprocessor().addPPCallbacks(collectInclusionsInMainFileCallback(
+        Clang->getSourceManager(), [&Includes](Inclusion Inc) {
+          Includes->get()->addExisting(std::move(Inc));
----------------
nit: includes is a pointer, capture by value?


================
Comment at: clangd/CodeComplete.cpp:962
       Output = runWithSema();
+      Includes.release(); // Make sure this doesn't out-live Clang.
       SPAN_ATTACH(Tracer, "sema_completion_kind",
----------------
This leaks. reset (or = nullptr)


Repository:
  rCTE Clang Tools Extra

https://reviews.llvm.org/D46497



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

Reply via email to