[PATCH] D51852: [clangd] Implement FuzzyFindRequest JSON (de)serialization

Sam McCall via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Sep 10 03:30:03 PDT 2018


sammccall accepted this revision.
sammccall added inline comments.
This revision is now accepted and ready to land.


================
Comment at: clang-tools-extra/clangd/CodeComplete.cpp:1384
     Req.ProximityPaths.push_back(FileName);
-    vlog("Code complete: fuzzyFind(\"{0}\", scopes=[{1}])", Req.Query,
-         llvm::join(Req.Scopes.begin(), Req.Scopes.end(), ","));
+    vlog("Code complete: fuzzyFind({0})", toJSON(Req));
 
----------------
{0:2} for prettyprinting


================
Comment at: clang-tools-extra/clangd/index/Index.cpp:198
+  // Typically, MaxCandidateCount is either maximum size_t value or something
+  // small. Since LLVM JSON serializer only supports int64_t, try to cast to
+  // int64_t and make this field "optional".
----------------
Can we explain this in simpler semantic terms?
e.g. `// A huge limit means no limit, leave it out.`


================
Comment at: clang-tools-extra/clangd/index/Index.h:258
 };
-inline Symbol::SymbolFlag  operator|(Symbol::SymbolFlag A, Symbol::SymbolFlag  B) {
+inline Symbol::SymbolFlag operator|(Symbol::SymbolFlag A,
+                                    Symbol::SymbolFlag B) {
----------------
please fix your editor to only format changed lines


https://reviews.llvm.org/D51852





More information about the cfe-commits mailing list