yar*_*yar 11 c++ clang autoformatting clang-format
是否有可能告诉Clang-Format忽略换行操作的注释?我们的想法是遵循"代码格式正确,即使评论超出换行余量"的风格.代码不应分成多行,如果它不超过保证金,但注释会.
例如
//desired behaviour:
short code = shortCode +
longlonglongCode;
short code = shortCode; //long comment without a line break
//not desired behaviour:
short code =
shortCode; //long comment without a line break
Run Code Online (Sandbox Code Playgroud)
回流注释:(
bool)如果为
true,clang-format将尝试重排注释。Run Code Online (Sandbox Code Playgroud)false: // veryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryLongComment with plenty of information /* second veryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryLongComment with plenty of information */ true: // veryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryLongComment with plenty of // information /* second veryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryLongComment with plenty of * information */
| 归档时间: |
|
| 查看次数: |
1261 次 |
| 最近记录: |