MyDeveloperDay planned changes to this revision. MyDeveloperDay marked 4 inline comments as done. MyDeveloperDay added inline comments.
================ Comment at: clang/lib/Format/TokenAnnotator.cpp:3499 return true; if (Right.Previous->ClosesTemplateDeclaration && Right.Previous->MatchingParen && ---------------- miscco wrote: > I think that your change should actually come in here where we determine what > to do after a `ClosesTemplateDeclaration` > > With an potential new option `AlwaysBreakConceptDeclarations ` that should > probably default to `AlwaysBreakTemplateDeclarations ` this would read > ``` > if (Right.Previous->ClosesTemplateDeclaration && > Right.Previous->MatchingParen && > Right.Previous->MatchingParen->NestingLevel == 0) { > if (Right.is(tok::kw_requires)) { > switch(Style.AllowShortRequiresClause) { > case FormatStyle::SRCS_Never: > return true; > case FormatStyle::SRCS_Always: > return false; > case FormatStyle::SRCS_Single: > // TODO: Determine whether there is a single constraint > return true; > case FormatStyle::SRCS_Short: > // TODO: Determine whether the constraint clause is short enough > return true; > } > } else if (Right.is(tok::kw_concept)) { > return Style.AlwaysBreakConceptDeclarations == FormatStyle::BTCS_Yes); > } else { > return Style.AlwaysBreakTemplateDeclarations == > FormatStyle::BTDS_Yes); > } > } > ``` yes this is a better place CHANGES SINCE LAST ACTION https://reviews.llvm.org/D79773/new/ https://reviews.llvm.org/D79773 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits