[PATCH] D140339: [clang-format] Remove special logic for parsing concept definitions.
Emilia Dreamer via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Dec 19 14:06:03 PST 2022
rymiel added inline comments.
================
Comment at: clang/lib/Format/TokenAnnotator.cpp:1683
- if (Tok->isOneOf(tok::kw_class, tok::kw_enum, tok::kw_concept,
- tok::kw_struct, tok::kw_using)) {
+ if (Tok->isOneOf(tok::kw_class, tok::kw_enum, tok::kw_struct,
+ tok::kw_using)) {
----------------
HazardyKnusperkeks wrote:
> Does this change anything, besides the penalties and by that the wrapping?
>
> While I can live with both, I think we should not format code differently, if it's not by a bugfix.
The only changes I could see:
- the change in `Context.IsExpression`, which causes the change in penalties;
- the fact that a new `AnnotatedLine` isn't created for the body of a `concept` (i.e. the stuff after the equals sign), where as it previously was.
- some invalid syntax is formatted differently
It's very likely I don't have a "sample size" large enough.
I am also okay with doing both; I made this issue to gauge what is the preferred direction by the reviewers.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D140339/new/
https://reviews.llvm.org/D140339
More information about the cfe-commits
mailing list