[PATCH] D113319: [clang-format] Improve require and concept handling

Björn Schäpers via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Feb 4 11:18:30 PST 2022


HazardyKnusperkeks updated this revision to Diff 406048.
HazardyKnusperkeks marked an inline comment as done.
HazardyKnusperkeks edited the summary of this revision.
HazardyKnusperkeks added a comment.

This took a lot of work and debugging.
I tried to minimize the refactoring on related code (I've prepared quite a few other commits and stashes...).

I'm confident that we can now format every sane use of requires clauses, expressions, and concept declarations. And even some I wouldn't call sane.

Decided to drop https://llvm.org/PR32166 since in this approach the book keeping to bring the indention back on track after the clause would be too much burden on everyone not using it.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D113319/new/

https://reviews.llvm.org/D113319

Files:
  clang/docs/ClangFormatStyleOptions.rst
  clang/docs/ReleaseNotes.rst
  clang/include/clang/Format/Format.h
  clang/lib/Format/ContinuationIndenter.cpp
  clang/lib/Format/Format.cpp
  clang/lib/Format/FormatToken.h
  clang/lib/Format/TokenAnnotator.cpp
  clang/lib/Format/UnwrappedLineParser.cpp
  clang/lib/Format/UnwrappedLineParser.h
  clang/unittests/Format/FormatTest.cpp
  clang/unittests/Format/TokenAnnotatorTest.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D113319.406048.patch
Type: text/x-patch
Size: 102324 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20220204/85445304/attachment-0001.bin>


More information about the cfe-commits mailing list