ilya-biryukov added inline comments.
================
Comment at: clang-tools-extra/clangd/benchmarks/IndexBenchmark.cpp:21
+using clang::clangd::loadIndex;
+using clang::clangd::SymbolIndex;
----------------
We don't need the usings, just shorten the name on usage sites (usages are
inside namespace clangd)
================
Comment at: clang-tools-extra/clangd/benchmarks/IndexBenchmark.cpp:39
-// This function processes user-provided Log file with fuzzy find requests in
-// the following format:
-//
-// fuzzyFind("UnqualifiedName", scopes=["clang::", "clang::clangd::"])
-//
-// It constructs vector of FuzzyFindRequests which is later used for the
-// benchmarks.
-std::vector<clang::clangd::FuzzyFindRequest> extractQueriesFromLogs() {
- llvm::Regex RequestMatcher("fuzzyFind\\(\"([a-zA-Z]*)\", scopes=\\[(.*)\\]");
- llvm::SmallVector<llvm::StringRef, 200> Matches;
- std::ifstream InputStream(LogFilename);
+// Reads '\n'-separated FuzzyFindRequest JSON representations from
user-provided
+// file.
----------------
Maybe read a JSON array from the file instead?
I.e. one would have to write `[{/*request1*/}, {/*request2*/}, ..]` instead of
putting a request per line
Pros: we get valid json, can have prettified forms too.
Cons: might be a bit harder to construct the json array. But don't think it's a
big deal.
https://reviews.llvm.org/D51971
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits