[PATCH] D36133: [clangd] Rewrote AST and Preamble management.

Benjamin Kramer via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Aug 1 03:21:03 PDT 2017


bkramer added inline comments.


================
Comment at: clangd/ClangdServer.h:113
+  /// queue. The request will be run on a separate thread.
+  template <class Func, class... Args> void addToFront(Func &&F, Args &&... As);
+  /// Add a new request to run function \p F with args \p As to the end of the
----------------
Why the template? This is awkward now because it can only be called from ClangdServer.cpp


================
Comment at: clangd/ClangdUnit.cpp:887-889
+tooling::CompileCommand const &CppFile::getCompileCommand() const {
+  return Command;
+}
----------------
Move implementation into header


================
Comment at: clangd/ClangdUnit.cpp:910
+  return WasCancelledBeforeConstruction;
+}
+
----------------
Move implementation into header.


================
Comment at: clangd/ClangdUnit.h:104
 
-    ~ParsedAST();
+// Providse thread-safe access to ParsedAST.
+class ParsedASTWrapper {
----------------
Typo: Providse


================
Comment at: clangd/ClangdUnitStore.cpp:22
     return;
   OpenedFiles.erase(It);
 }
----------------
Not introduced in this commit, but this is equivalent to OpenedFiles.erase(File) without the find and check.


https://reviews.llvm.org/D36133





More information about the cfe-commits mailing list