[PATCH] D33350: [clangd] Switch to incomplete translation units

Krasimir Georgiev via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri May 19 02:58:28 PDT 2017


krasimir created this revision.

This speeds up code completion. All the cool kids (ycmd) are doing it.


https://reviews.llvm.org/D33350

Files:
  clangd/ClangdUnit.cpp


Index: clangd/ClangdUnit.cpp
===================================================================
--- clangd/ClangdUnit.cpp
+++ clangd/ClangdUnit.cpp
@@ -45,7 +45,7 @@
       ArgP, ArgP + ArgStrs.size(), PCHs, Diags, ResourceDir,
       /*OnlyLocalDecls=*/false, /*CaptureDiagnostics=*/true, RemappedSource,
       /*RemappedFilesKeepOriginalName=*/true,
-      /*PrecompilePreambleAfterNParses=*/1, /*TUKind=*/TU_Complete,
+      /*PrecompilePreambleAfterNParses=*/1, /*TUKind=*/TU_Prefix,
       /*CacheCodeCompletionResults=*/true,
       /*IncludeBriefCommentsInCodeCompletion=*/true,
       /*AllowPCHWithCompilerErrors=*/true));


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D33350.99535.patch
Type: text/x-patch
Size: 634 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20170519/b800e9ab/attachment-0001.bin>


More information about the cfe-commits mailing list