[PATCH] D138378: [clang-format][NFC] Skip unneeded calculations
Owen Pan via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Nov 21 14:17:56 PST 2022
owenpan added inline comments.
================
Comment at: clang/lib/Format/WhitespaceManager.cpp:1434-1436
+ if (Style.UseTab == FormatStyle::UT_Never) {
+ ReplacementText.append(Spaces, ' ');
+ } else {
----------------
HazardyKnusperkeks wrote:
> owenpan wrote:
> > Doing this would lose some of the abstraction we have now without any gain in performance? Then we should leave it (and `appendIndentText` below) as is.
> The `UT_Never` case would be faster, if that would be measurable I don't know.
Probably negligible. Can we keep the current code which encapsulates the handling of `UT_Never` within `appendIndentText`?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D138378/new/
https://reviews.llvm.org/D138378
More information about the cfe-commits
mailing list