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

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to