[Lldb-commits] [PATCH] D15562: Add AccessModifierOffset to clang-format style

Pavel Labath via lldb-commits lldb-commits at lists.llvm.org
Wed Dec 16 04:20:43 PST 2015


labath created this revision.
labath added reviewers: zturner, tfiala.
labath added a subscriber: lldb-commits.

As we override the indent option of the LLVM style, we need to override the access modifier
offset as well. Otherwise, classes will be formatted like such
class A
{
  public:
    int foo;
};
which is not used anywhere in LLDB. This option makes clang-format style more similar to LLDB and
brings it closer to the original intention of LLVM style, which was to not indent access
modifiers.

http://reviews.llvm.org/D15562

Files:
  .clang-format

Index: .clang-format
===================================================================
--- .clang-format
+++ .clang-format
@@ -6,3 +6,4 @@
 AllowShortFunctionsOnASingleLine: Inline
 ConstructorInitializerAllOnOneLineOrOnePerLine: true
 IndentCaseLabels: true
+AccessModifierOffset: -4


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D15562.42988.patch
Type: text/x-patch
Size: 287 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20151216/b8bbf83e/attachment-0001.bin>


More information about the lldb-commits mailing list