Please use GitHub pull requests for new patches. Phabricator shutdown timeline
Changeset View
Changeset View
Standalone View
Standalone View
clang/lib/Format/TokenAnnotator.cpp
Show First 20 Lines • Show All 4,628 Lines • ▼ Show 20 Lines | if (Style.BreakConstructorInitializers == FormatStyle::BCIS_AfterColon && | ||||
return true; | return true; | ||||
} | } | ||||
} | } | ||||
if (Style.PackConstructorInitializers < FormatStyle::PCIS_CurrentLine && | if (Style.PackConstructorInitializers < FormatStyle::PCIS_CurrentLine && | ||||
Style.BreakConstructorInitializers == FormatStyle::BCIS_BeforeComma && | Style.BreakConstructorInitializers == FormatStyle::BCIS_BeforeComma && | ||||
Right.isOneOf(TT_CtorInitializerComma, TT_CtorInitializerColon)) { | Right.isOneOf(TT_CtorInitializerComma, TT_CtorInitializerColon)) { | ||||
return true; | return true; | ||||
} | } | ||||
if (Style.PackConstructorInitializers == FormatStyle::PCIS_NextLineOnly) { | |||||
if ((Style.BreakConstructorInitializers == FormatStyle::BCIS_BeforeColon || | |||||
Style.BreakConstructorInitializers == FormatStyle::BCIS_BeforeComma) && | |||||
Right.is(TT_CtorInitializerColon)) { | |||||
return true; | |||||
} | |||||
if (Style.BreakConstructorInitializers == FormatStyle::BCIS_AfterColon && | |||||
Left.is(TT_CtorInitializerColon)) { | |||||
return true; | |||||
} | |||||
} | |||||
// Break only if we have multiple inheritance. | // Break only if we have multiple inheritance. | ||||
if (Style.BreakInheritanceList == FormatStyle::BILS_BeforeComma && | if (Style.BreakInheritanceList == FormatStyle::BILS_BeforeComma && | ||||
Right.is(TT_InheritanceComma)) { | Right.is(TT_InheritanceComma)) { | ||||
return true; | return true; | ||||
} | } | ||||
if (Style.BreakInheritanceList == FormatStyle::BILS_AfterComma && | if (Style.BreakInheritanceList == FormatStyle::BILS_AfterComma && | ||||
Left.is(TT_InheritanceComma)) { | Left.is(TT_InheritanceComma)) { | ||||
return true; | return true; | ||||
▲ Show 20 Lines • Show All 617 Lines • Show Last 20 Lines |