[clang] [clang-format] Add BreakBeforeTemplateClose option (PR #118046)

via cfe-commits cfe-commits at lists.llvm.org
Fri Dec 6 19:37:18 PST 2024


leijurv wrote:

> I think you should add test cases with multiple `>>` closing, see `UnderstandsTemplateParameters` for example.
> 
> Consider trying the code snippet mentioned in #80049 as well.

Thank you for the suggestion! I have integrated that test case. It indicated that I was being too narrow - `ClosesTemplateDeclaration` only applies before functions, but, as you demonstrate, there are several other cases where templates are closed, so I have switched to `TT_TemplateCloser`.

https://github.com/llvm/llvm-project/pull/118046/commits/212e444426a2d194df996909a40ad0e0fc681d98


https://github.com/llvm/llvm-project/pull/118046


More information about the cfe-commits mailing list