[PATCH] D127270: [clang-format] Add space in placement new expression
MyDeveloperDay via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Jun 16 03:37:24 PDT 2022
MyDeveloperDay added inline comments.
================
Comment at: clang/include/clang/Format/Format.h:3495
+ /// \code
+ /// true: false:
+ /// new (buf) T; vs. new(buf) T;
----------------
should this be `Always/Never`
================
Comment at: clang/lib/Format/Format.cpp:939
IO.mapOptional("AfterOverloadedOperator", Spacing.AfterOverloadedOperator);
+ IO.mapOptional("AfterPlacementOperator", Spacing.AfterPlacementOperator);
IO.mapOptional("AfterRequiresInClause", Spacing.AfterRequiresInClause);
----------------
when you've fixed the code please mark the comment "done.."
================
Comment at: clang/lib/Format/TokenAnnotator.cpp:3396
spaceRequiredBeforeParens(Right);
+ if (Style.SpaceBeforeParens == FormatStyle::SBPO_Custom &&
+ Left.isOneOf(tok::kw_new, tok::kw_delete) &&
----------------
shouldn't the very first part of this be?
```
if (Style.SpaceBeforeParensOptions.AfterPlacementOperator != FormatStyle::SpaceBeforeParensCustom::APO_Leave)
{
....
}
```
i.e. don't we want a zero change if someone says "Leave"
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D127270/new/
https://reviews.llvm.org/D127270
More information about the cfe-commits
mailing list