diff options
author | Daniel Jasper <djasper@google.com> | 2013-02-14 08:42:54 +0000 |
---|---|---|
committer | Daniel Jasper <djasper@google.com> | 2013-02-14 08:42:54 +0000 |
commit | 6cabab48dacc1317821f8f078ed2d4c603b67aff (patch) | |
tree | 843d403dc69a7904e2403a8dcd487dd940d959b4 /lib/Format/Format.cpp | |
parent | b9316b3829372c71f2f54d54a9748285f7ffe3fd (diff) |
Align superclasses for multiple inheritence.
This fixes llvm.org/PR15179.
Before:
class ColorChooserMac : public content::ColorChooser,
public content::WebContentsObserver {
};
After:
class ColorChooserMac : public content::ColorChooser,
public content::WebContentsObserver {
};
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175147 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Format/Format.cpp')
-rw-r--r-- | lib/Format/Format.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/Format/Format.cpp b/lib/Format/Format.cpp index 8c2128eb01..1bd864e5c9 100644 --- a/lib/Format/Format.cpp +++ b/lib/Format/Format.cpp @@ -524,6 +524,8 @@ private: Previous.Type == TT_CtorInitializerColon) && getPrecedence(Previous) != prec::Assignment) State.Stack.back().LastSpace = State.Column; + else if (Previous.Type == TT_InheritanceColon) + State.Stack.back().Indent = State.Column; else if (Previous.ParameterCount > 1 && (Previous.is(tok::l_paren) || Previous.is(tok::l_square) || Previous.is(tok::l_brace) || @@ -564,6 +566,8 @@ private: const AnnotatedToken &Current = *State.NextToken; assert(State.Stack.size()); + if (Current.Type == TT_InheritanceColon) + State.Stack.back().AvoidBinPacking = true; if (Current.is(tok::lessless) && State.Stack.back().FirstLessLess == 0) State.Stack.back().FirstLessLess = State.Column; if (Current.is(tok::question)) |