[英]How to keep the parameters of a compound initializer function argument together with clang format
在 function 調用中獲取復合初始值設定項的片段
foo_make_person(ctx, &(foo_person_desc){
.name = "Bob",
.age = 50,
});
我怎樣才能讓 clang-format 完全像這樣格式化這段代碼?
我嘗試的一切看起來總是錯誤的。 如
foo_make_person(
ctx,
&(foo_person_desc){
.name = "Bob",
.age = 50,
});
或這個
foo_make_person(ctx,
&(foo_person_desc){
.name = "Bob",
.age = 50,
});
或這個
foo_make_person(ctx, &(foo_person_desc){
.name = "Bob",
.age = 50,
});
經過進一步研究,我得出結論,clang-format,就當前版本而言,無法進行這種格式化。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.