[PATCH] D51971: [clangd] Use JSON format in benchmark requests reader

Ilya Biryukov via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Sep 13 07:18:58 PDT 2018


ilya-biryukov accepted this revision.
ilya-biryukov added a comment.
This revision is now accepted and ready to land.

LGTM



================
Comment at: clang-tools-extra/clangd/benchmarks/IndexBenchmark.cpp:52
+  if (!JSONArray->getAsArray()) {
+    llvm::errs() << "Error when parsing JSON array: " << Log << '\n';
+    exit(1);
----------------
NIT: technically, the parsing succeeded at this point, maybe change to something like "top-level value is not a json array"?


================
Comment at: clang-tools-extra/clangd/benchmarks/IndexBenchmark.cpp:60
+    if (!fromJSON(Item, Request)) {
+      llvm::errs() << "Error when parsing request: " << Item << '\n';
+      exit(1);
----------------
NIT: s/parsing/deserializing?


https://reviews.llvm.org/D51971





More information about the cfe-commits mailing list