-
Notifications
You must be signed in to change notification settings - Fork 15.2k
Open
Labels
Description
to reproduce
.clang-format
AlignAfterOpenBracket: BlockIndent
AllowAllArgumentsOnNextLine: 'false'
AllowAllParametersOfDeclarationOnNextLine: 'false'
BinPackArguments: 'false'
BinPackParameters: 'false'
ColumnLimit: '120'
ContinuationIndentWidth: '1'
IndentWidth: '1'
Language: Cpp
Standard: Cpp11
TabWidth: '1'
UseCRLF: 'false'
UseTab: ForContinuationAndIndentationmain.cpp:
void function(int asdfasdfsdhgfjhksdgfjkhsd, int sdlfsdkljahgdfklsjhgdf, int sadlkghjasdlkghjfd, int sadlkghjasdlkghjfd, int sadlkghjasdlkghjfd, int sadlkghjasdlkghjfd);
typedef typename std::conditional<
func_one_arg,typename type_or_void<std::invoke_result<F, func_arg_type>>::type,
typename type_or_void<std::invoke_result<F, func_arg_type, size_t>>::type
>::type func_return_type;expected result
void function(
int asdfasdfsdhgfjhksdgfjkhsd,
int sdlfsdkljahgdfklsjhgdf,
int sadlkghjasdlkghjfd,
int sadlkghjasdlkghjfd,
int sadlkghjasdlkghjfd,
int sadlkghjasdlkghjfd
);
typedef typename std::conditional<
func_one_arg,
typename type_or_void<std::invoke_result<F, func_arg_type>>::type,
typename type_or_void<std::invoke_result<F, func_arg_type, size_t>>::type
>::type func_return_type;actual result
void function(
int asdfasdfsdhgfjhksdgfjkhsd,
int sdlfsdkljahgdfklsjhgdf,
int sadlkghjasdlkghjfd,
int sadlkghjasdlkghjfd,
int sadlkghjasdlkghjfd,
int sadlkghjasdlkghjfd
);
typedef typename std::conditional<
func_one_arg,
typename type_or_void<std::invoke_result<F, func_arg_type>>::type,
typename type_or_void<std::invoke_result<F, func_arg_type, size_t>>::type>::type func_return_type;As one can see, closing ) for function is moved to a new line, but closing > for template is not moved to the new line.
version
$ clang-format-14 --version
Debian clang-format version 14.0.1-++20220426012052+0e27d08cdeb3-1~exp1~20220426132142.127TheUnlocked and soup-in-boots