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

2015-08-20 Thread Florian Lindner via cfe-users
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

___
cfe-users mailing list
cfe-users@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-users


[cfe-users] clang-format and style file

2016-10-27 Thread Florian Lindner via cfe-users
Hello,

I play around with clang-format 3.8.1

My style file ~/.clang-format includes:

BraceWrapping:
  AfterClass:  false
  AfterControlStatement: false
  AfterEnum:   false
  AfterFunction:   true
  AfterNamespace:  false

But still it produces a format like that:

namespace precice
{
namespace mapping
{


Another thing I tried

% clang-format -style=file -dump-config > out
% diff out ../.clang-format
2a3
> # BasedOnStyle:  LLVM
23c24
<   AfterClass:  true
---
>   AfterClass:  false
27c28
<   AfterNamespace:  true
---
>   AfterNamespace:  false

So it seems to ignore the style file.


Anything I'm getting wrong there?

Thanks,
Florian
___
cfe-users mailing list
cfe-users@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-users