[PATCH] D37845: [clang-format] New flag - BraceWrapping.AfterExternC

Pawel Maciocha via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Sep 14 01:09:47 PDT 2017


PriMee created this revision.
Herald added a subscriber: klimek.

Bug: https://bugs.llvm.org/show_bug.cgi?id=34016 - **"extern C part"**

**Problem:**

Due to the lack of "brace wrapping extern" flag, clang format does parse the block after **extern** keyword moving the opening bracket to the header line always!

**Patch description:**

A new style added, new configuration flag - **BraceWrapping.AfterExternC** that allows us to decide whether we want a break before brace or not.


https://reviews.llvm.org/D37845

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

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D37845.115179.patch
Type: text/x-patch
Size: 7049 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20170914/552c9dde/attachment-0001.bin>


More information about the cfe-commits mailing list