[cfe-dev] clang-format and style file

Florian Lindner via cfe-dev cfe-dev at lists.llvm.org
Tue Dec 6 02:29:36 PST 2016


Hello,

I play around with clang-format 3.9.0

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



More information about the cfe-dev mailing list