[PATCH] D12492: [Clang-Format] Add AlwaysBreakBeforeElse Style to avoid cuddled else

Paul Hoad via cfe-commits cfe-commits at lists.llvm.org
Mon Aug 31 06:04:37 PDT 2015


MyDeveloperDay created this revision.
MyDeveloperDay added reviewers: nikola, djasper, poiru, klimek.
MyDeveloperDay added a subscriber: cfe-commits.
Herald added a subscriber: klimek.

Implementation of Jarkko Hietaniemi original AlwaysBreakBeforeElse to avoid cuddled braces on an "else" statement.

WebKit Style + Linux BreakBeforeBraces style gives cuddled else brackets, this patch adds an AlwaysBreakBeforeElse style to allow required brace style such that the else is placed on a newline after the closing brace of the if

Patch by: Jarkko Hietaniemi

http://reviews.llvm.org/D12492

Files:
  docs/ClangFormatStyleOptions.rst
  include/clang/Format/Format.h
  lib/Format/Format.cpp
  lib/Format/UnwrappedLineParser.cpp
  unittests/Format/FormatTest.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D12492.33572.patch
Type: text/x-patch
Size: 4453 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20150831/e17bf852/attachment-0001.bin>


More information about the cfe-commits mailing list