ilya-biryukov added inline comments.
================ Comment at: clang-tools-extra/clangd/benchmarks/IndexBenchmark.cpp:48 + llvm::errs() << "Error when parsing json requests file: " + << llvm::toString(JSONArray.takeError()); + exit(1); ---------------- We should only call `takeError()` when `JSONArray` is an error. Not an array value should be handled separately. BTW, can we add tests with invalid inputs for both of these cases? ================ Comment at: clang-tools-extra/clangd/benchmarks/IndexBenchmark.cpp:56 + if (!fromJSON(Item, Request)) { + llvm::errs() << "Error when parsing request.\n"; + exit(1); ---------------- Maybe also output the request that failed to parse? To help untangle the problem in case it happens. https://reviews.llvm.org/D51971 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits