[cfe-dev] clang-format ContinuationIndentWidth

Jakub Klener via cfe-dev cfe-dev at lists.llvm.org
Tue Oct 23 06:56:14 PDT 2018


Hi everyone,

is there a possibility to fine tune ContinuationIndentWidth in the same 
manner as BreakBeforeBraces in clang-format?
If no, is there a way how to create a feature request because I think 
that the current situation is inconsistent.
For example if you set:

BinPackArguments: true
BinPackParameters: true
BreakBeforeBraces: Custom
BraceWrapping:
   AfterFunction: True
   AfterControlStatement: False
ContinuationIndentWidth: 4

call_my_func(realy_long_variable_name1, realy_long_variable_name2,
     realy_long_variable_name3)
{
     some_clever_code();  // That is OK
}

but

if (realy_long_variable_name1 && realy_long_variable_name2
     && realy_long_variable_name3) {
     some_clever_code();  // That doesn't visually separate the body
}

It should become:

if (realy_long_variable_name1 && realy_long_variable_name2
         && realy_long_variable_name3) {
     some_clever_code();  // That doesn't visually separate the body
}

or

if (realy_long_variable_name1 && realy_long_variable_name2
     && realy_long_variable_name3
) {
     some_clever_code();  // That doesn't visually separate the body
}

Thanks!
Jakub

-- 
* Jakub Klener
* Eyen SE
* Pocernicka 272/96
* 108 00 Prague
* Czech Republic
* http://www.eyen.eu/




More information about the cfe-dev mailing list