[PATCH] D52233: [dexp] Dump JSON representations of fuzzy find requests

Kirill Bobyrev via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Sep 20 02:13:38 PDT 2018


kbobyrev updated this revision to Diff 166241.
kbobyrev marked an inline comment as done.
kbobyrev retitled this revision from "[dexp] Allow users to dump JSON representations of fuzzy find requests" to "[dexp] Dump JSON representations of fuzzy find requests".
kbobyrev edited the summary of this revision.
kbobyrev added a comment.

I thought that we might not want to produce too much information, but I don't have anything against printing the JSON representation of every user request.


https://reviews.llvm.org/D52233

Files:
  clang-tools-extra/clangd/index/dex/dexp/Dexp.cpp


Index: clang-tools-extra/clangd/index/dex/dexp/Dexp.cpp
===================================================================
--- clang-tools-extra/clangd/index/dex/dexp/Dexp.cpp
+++ clang-tools-extra/clangd/index/dex/dexp/Dexp.cpp
@@ -123,6 +123,7 @@
       StringRef(this->Scopes).split(Scopes, ',');
       Request.Scopes = {Scopes.begin(), Scopes.end()};
     }
+    llvm::outs() << llvm::formatv("Request:\n{0}\n\n", toJSON(Request));
     // FIXME(kbobyrev): Print symbol final scores to see the distribution.
     static const auto OutputFormat = "{0,-4} | {1,-40} | {2,-25}\n";
     llvm::outs() << llvm::formatv(OutputFormat, "Rank", "Symbol ID",


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D52233.166241.patch
Type: text/x-patch
Size: 654 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20180920/026e9c38/attachment.bin>


More information about the cfe-commits mailing list