【发布时间】:2018-11-14 06:54:06
【问题描述】:
我一直在使用 clang 格式来帮助保持我的代码整洁。对于多行函数调用,有没有办法让clang将克隆括号放在它自己的行上?
示例:
它现在在做什么:
increment_and_call_on_match(
clique_colors,
0,
max_clique_color,
[&](int clique_color) {
comms.emplace_back(context.split_by_color(clique_color));
},
[&](int) { context.split_by_color(); });
我想要什么:
increment_and_call_on_match(
clique_colors,
0,
max_clique_color,
[&](int clique_color) {
comms.emplace_back(context.split_by_color(clique_color));
},
[&](int) { context.split_by_color(); }
); //Closing paren on new line
【问题讨论】:
标签: c++ clang-format