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

thanks!



================
Comment at: clang-tools-extra/clangd/ClangdLSPServer.cpp:1063
+      OnlyFix->isPreferred = true;
+      if (LSPDiags.size() == 1 && LSPDiags.front().range == Selection)
+        OnlyFix->diagnostics = {LSPDiags.front()};
----------------
no need for `LSPDiags` anymore, you can just use `ToLSPDiags.begin()`


================
Comment at: clang-tools-extra/clangd/ClangdServer.cpp:671
+    if (KindAllowed(CodeAction::QUICKFIX_KIND)) {
+      auto FindMatched = [&InpAST](const DiagRef &DR) -> const clangd::Diag * {
+        for (const auto &Diag : InpAST->AST.getDiagnostics())
----------------
nit: you can return an `llvm::ArrayRef<Fix>` here and get rid of one extra 
layer of nesting down below


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D155173

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

Reply via email to