[PATCH] Fixes bug 20587 - Add K&R break before braces style

Roman Kashitsyn romankashicin at gmail.com
Mon Aug 11 04:30:37 PDT 2014


Fix Linux BrakeBeforeBraces style: attach left braces to structs as
shown to us by the prophets Kernighan and Ritchie.

Before:
```
namespace ns
{
class C
{
public:
  int x;
};
struct X
{
  int x;
};
}
```

After:
```
namespace ns
{
class C
{
public:
  int x;
};
struct X {
  int x;
};
}
```

http://reviews.llvm.org/D4837

Files:
  lib/Format/UnwrappedLineParser.cpp
  unittests/Format/FormatTest.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D4837.12343.patch
Type: text/x-patch
Size: 9504 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20140811/3df511e9/attachment.bin>


More information about the cfe-commits mailing list