[PATCH] D50962: [clangd] Speculative code completion index request before Sema is run.

Ilya Biryukov via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Aug 24 03:02:40 PDT 2018


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

LG, thanks. And two small NITs.



================
Comment at: clangd/CodeComplete.h:184
+llvm::Expected<llvm::StringRef>
+speculateCompletionFilter(llvm::StringRef Content, Position Pos);
+
----------------
Is it exposed only for tests?
Maybe add a comment that it's a private API that should be avoided and put it to the end of the file?


================
Comment at: clangd/CodeComplete.h:201
+  /// The result is consumed by `codeComplete()` if speculation succeeded.
+  /// NOTE that the structure can only be destroyed after the async call
+  /// finishes.
----------------
A comment does not mention the destructor will wait for the async call to finish.
Maybe add that, it looks like an important detail?


Repository:
  rCTE Clang Tools Extra

https://reviews.llvm.org/D50962





More information about the cfe-commits mailing list