[PATCH] D153579: [clang-format] Fix RAS reference alignment when PAS is left or middle
Owen Pan via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Jun 26 17:31:01 PDT 2023
owenpan added inline comments.
================
Comment at: clang/lib/Format/WhitespaceManager.cpp:459
Changes[i].Spaces != 0) {
for (int Previous = i - 1;
Previous >= 0 &&
----------------
See below.
================
Comment at: clang/lib/Format/WhitespaceManager.cpp:463-466
+ if (Changes[Previous].Tok->is(tok::amp) ||
+ Changes[Previous].Tok->is(tok::ampamp)) {
+ if (Style.ReferenceAlignment != FormatStyle::RAS_Right &&
+ Style.ReferenceAlignment != FormatStyle::RAS_Pointer) {
----------------
Shorter and IMO easier to follow.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D153579/new/
https://reviews.llvm.org/D153579
More information about the cfe-commits
mailing list