[PATCH] D41495: [clangd] Skip function bodies when building the preamble

2018-01-02 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a comment. In https://reviews.llvm.org/D41495#965627, @nik wrote: > Hmm, could libclang profit from something like this, too? (or does it > already?) It could. The problem with ASTUnit is that it returns all diagnostics from `store_diag_begin`/`end`, not just the ones

[PATCH] D41495: [clangd] Skip function bodies when building the preamble

2018-01-02 Thread Nikolai Kosjar via Phabricator via cfe-commits
nik added a comment. Hmm, could libclang profit from something like this, too? (or does it already?) Repository: rL LLVM https://reviews.llvm.org/D41495 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D41495: [clangd] Skip function bodies when building the preamble

2017-12-28 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL321521: [clangd] Skip function bodies when building the preamble (authored by ibiryukov, committed by ). Repository: rL LLVM https://reviews.llvm.org/D41495 Files:

[PATCH] D41495: [clangd] Skip function bodies when building the preamble

2017-12-22 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov updated this revision to Diff 127995. ilya-biryukov marked an inline comment as done. ilya-biryukov added a comment. - Updated a comment Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D41495 Files: clangd/ClangdUnit.cpp Index: clangd/ClangdUnit.cpp

[PATCH] D41495: [clangd] Skip function bodies when building the preamble

2017-12-22 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added inline comments. Comment at: clangd/ClangdUnit.cpp:536 + // so we set SkipFunctionBodies back to false after preamble is built. + assert(!CI->getFrontendOpts().SkipFunctionBodies); + CI->getFrontendOpts().SkipFunctionBodies = true;

[PATCH] D41495: [clangd] Skip function bodies when building the preamble

2017-12-21 Thread Sam McCall via Phabricator via cfe-commits
sammccall accepted this revision. sammccall added a comment. This revision is now accepted and ready to land. Those are some impressive numbers! Excited to see this land, thanks for tracking down all the weird problems. Comment at: clangd/ClangdUnit.cpp:536 + // so we set

[PATCH] D41495: [clangd] Skip function bodies when building the preamble

2017-12-21 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a comment. I haven't done proper benchmarks, but here are some numbers from running this on my machine: Sizes of preamble with (before the change) and without (after the change) functon bodies: | File | Before | After | | ClangdUnit.cpp |

[PATCH] D41495: [clangd] Skip function bodies when building the preamble

2017-12-21 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov created this revision. ilya-biryukov added a reviewer: sammccall. Herald added a subscriber: klimek. To make building preambles faster and keep them smaller. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D41495 Files: clangd/ClangdUnit.cpp Index: