[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:44:02 PST 2022


HazardyKnusperkeks marked 3 inline comments as done.
HazardyKnusperkeks added a comment.

Format notes updated on local commit.



================
Comment at: clang/docs/ClangFormatStyleOptions.rst:3399
 
+**RequiresClausePositionForClasses** (``RequiresClausePositionStyle``) :versionbadge:`clang-format 14`
+  The position of the ``requires`` clause for class templates.
----------------
Mordante wrote:
> I assume that should `clang-format 15` now. Same for other new options.
Yeah, you hit the small margin between my reply and my upload of the current diff. ;)


================
Comment at: clang/lib/Format/Format.cpp:1212
   LLVMStyle.ReferenceAlignment = FormatStyle::RAS_Pointer;
+  // This is open for discussions! When will LLVM adapt C++20?
+  LLVMStyle.RequiresClausePositionForClasses = FormatStyle::RCPS_OwnLine;
----------------
Mordante wrote:
> Note the libc++ already uses C++20 code. We don't use clang-format officially, but I use it for new code. (Mainly the `std::format` related code.)
And is there a consensus about formatting requires clauses?


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

https://reviews.llvm.org/D113319



More information about the cfe-commits mailing list