On Mon, Dec 16, 2013 at 2:41 PM, Alexander Kornienko <[email protected]>wrote:
> On Mon, Dec 16, 2013 at 9:21 PM, Nico Weber <[email protected]> wrote: > >> Thanks! >> >> Current head now does: >> thakis$ echo "A():b(0),c(0) {}" | Release+Asserts/bin/clang-format >> -style=WebKit >> A() >> : b(0) >> , c(0) {} >> >> The {} is still wrong according to >> http://www.webkit.org/coding/coding-style.html "Function definitions: >> place each brace on its own line." >> > > Does WebKit style allow short (0-1 statements) function bodies on a single > line? > In my interpretation of the style guide this isn't allowed ("Function definitions: place each brace on its own line."). In practice, inline definitions of short methods in classes are on single lines often. For regular toplevel methods, both braces are always on their own line each almost always (according to `find Source/core/ -name '*.cpp' | xargs ack '\{.*\}'`) > If no, the solution is just to turn off the corresponding flag for the > WebKit style. If yes, we should probably refrain from joining lines in > constructor with initializer lists, > when BreakConstructorInitializersBeforeComma is true. >
_______________________________________________ cfe-commits mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
