[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 01:17:23 PDT 2018
ilya-biryukov added inline comments.
================
Comment at: clang-tools-extra/clangd/benchmarks/IndexBenchmark.cpp:45
+ if (!JSONArray) {
+ llvm::errs() << "Couldn't parse request.\n";
+ }
----------------
kbobyrev wrote:
> ilya-biryukov wrote:
> > Return from function after error?
> I thought that this should panic instead of returning empty `Requests`: otherwise it wouldn't be possible to detect problems in the benchmark driver in test, for example (it will just run benchmark over empty list of requests instead of doing something useful).
Let's "panic" explicitly, e.g. with `exit(1)`.
We're currently triggering undefined behaviour, not something we want to do.
https://reviews.llvm.org/D51971
More information about the cfe-commits
mailing list