This is an archive of the discontinued LLVM Phabricator instance.

Add AccessModifierOffset to clang-format style
ClosedPublic

Authored by labath on Dec 16 2015, 4:20 AM.

Details

Summary

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.

Diff Detail

Repository
rL LLVM

Event Timeline

labath updated this revision to Diff 42988.Dec 16 2015, 4:20 AM
labath retitled this revision from to Add AccessModifierOffset to clang-format style.
labath updated this object.
labath added reviewers: zturner, tfiala.
labath added a subscriber: lldb-commits.

Hey Jim, this looks right to me. Agree?

-Todd

tfiala accepted this revision.Dec 16 2015, 8:09 AM
tfiala edited edge metadata.
This revision is now accepted and ready to land.Dec 16 2015, 8:09 AM
zturner accepted this revision.Dec 16 2015, 8:13 AM
zturner edited edge metadata.
jingham edited edge metadata.Dec 16 2015, 10:13 AM
jingham added a subscriber: jingham.

We don't indent access modifiers, so if AccessModifierOffset does what it's name suggests, then that's right.

Jim

I think we're good with this then, Pavel.

This revision was automatically updated to reflect the committed changes.