-
Notifications
You must be signed in to change notification settings - Fork 15.4k
Open
Labels
Description
When running clang-format on the following code section:
RegexASTCapture(
std::unique_ptr<RegexAST<NFAStateType>> group_regex_ast,
std::unique_ptr<Tag> tag
)
: m_group_regex_ast{
nullptr == group_regex_ast
? throw std::invalid_argument("Group regex AST cannot be null")
: std::move(group_regex_ast)},
m_tag{nullptr == tag ? throw std::invalid_argument("Tag cannot be null")
: std::move(tag)} {
RegexAST<NFAStateType>::set_subtree_positive_tags(
m_group_regex_ast->get_subtree_positive_tags()
);
RegexAST<NFAStateType>::add_subtree_positive_tags({m_tag.get()});
}
The formatted result is:
RegexASTCapture(
std::unique_ptr<RegexAST<NFAStateType>> group_regex_ast,
std::unique_ptr<Tag> tag
)
: m_group_regex_ast{nullptr == group_regex_ast ? throw std::invalid_argument("Group regex AST cannot be null") : std::move(group_regex_ast)},
m_tag{nullptr == tag ? throw std::invalid_argument("Tag cannot be null")
: std::move(tag)} {
RegexAST<NFAStateType>::set_subtree_positive_tags(
m_group_regex_ast->get_subtree_positive_tags()
);
RegexAST<NFAStateType>::add_subtree_positive_tags({m_tag.get()});
}
Configure files we used: y-scope/yscope-dev-utils@0ae873b
The ColumnLimit is set to 100, but exceeded
The bug can be reproduced on both clang-format 18.1 and 19.1