[PATCH] D93758: [format][NFC] Use unsigned char as the base of all enums in FormatStyle
Nathan James via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Dec 23 08:29:30 PST 2020
njames93 added a comment.
In D93758#2470124 <https://reviews.llvm.org/D93758#2470124>, @MyDeveloperDay wrote:
> I don't have any major issues with this other than it makes Format.h a bit more ugly. (there are more ugly and harder to understand pieces of code than this change!)
>
> We'll only normally really have 1 of these in play at any one time, but it is passed around quite a bit on the stack, should we care about the extra space it's taking? (I'm ok if the answer is "yes we should")
We only keep one instance on the stack in clang-format. But in tools that embed clang format we may keep more than 1 around. In clangd we are hoping to cache format styles for each file(well directory). As these cached items will live on the heap, saving about 16% from the size is worth it.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D93758/new/
https://reviews.llvm.org/D93758
More information about the cfe-commits
mailing list