[PATCH] D45815: [libclang] Add options to limit skipping of function bodies
Ilya Biryukov via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Apr 20 04:46:31 PDT 2018
ilya-biryukov added a comment.
In https://reviews.llvm.org/D45815#1072094, @nik wrote:
> @ilya: Using SkipFunctionBodies_AllExceptTemplates for the preamble might be also useful for clangd.
Unfortunately, that's also the biggest performance win you get when skipping the function bodies.
I.e. most codebases do not have function bodies in headers unless the function is template.
Have you measured the performance gain of skipping only non-template functions, but not skipping the template ones?
Would that really make a significant difference for any real codebase?
================
Comment at: include/clang/Frontend/SkipFunctionBodies.h:18
+enum SkipFunctionBodiesKind {
+ SkipFunctionBodies_None,
+ SkipFunctionBodies_All,
----------------
Maybe make it `enum class` and remove the name prefix from enumerators?
I.e. `enum class SkipFunctionBodiesKind { None, ....`
Repository:
rC Clang
https://reviews.llvm.org/D45815
More information about the cfe-commits
mailing list