[cfe-users] clang-format: Allow multiple statements in line

Florian Lindner via cfe-users cfe-users at lists.llvm.org
Thu Aug 20 00:26:53 PDT 2015


Hello,

I have code like that:

ierr = KSPDestroy(&ksp);CHKERRQ(ierr);

clang-format introduces a linebreak between the two statements. Is there a 
possiblity to omit that?

My configuration, based on style LLVM:

AllowAllParametersOfDeclarationOnNextLine: true
AllowShortBlocksOnASingleLine: true
AllowShortCaseLabelsOnASingleLine: true
AllowShortIfStatementsOnASingleLine: true
AllowShortLoopsOnASingleLine: true
AllowShortFunctionsOnASingleLine: All
AlwaysBreakAfterDefinitionReturnType: false
AlwaysBreakTemplateDeclarations: false
AlwaysBreakBeforeMultilineStrings: false

(I've just set every remotely related option to don't break)

Thanks,
Florian




More information about the cfe-users mailing list