|
@@ -608,8 +608,8 @@ static FormatStyle expandPresets(const FormatStyle &Style) {
|
|
return Style;
|
|
return Style;
|
|
FormatStyle Expanded = Style;
|
|
FormatStyle Expanded = Style;
|
|
Expanded.BraceWrapping = {false, false, false, false, false, false,
|
|
Expanded.BraceWrapping = {false, false, false, false, false, false,
|
|
- false, false, false, false, false,
|
|
|
|
- false, false, true, true, true};
|
|
|
|
|
|
+ false, false, false, false, false, false,
|
|
|
|
+ false, true, true, true};
|
|
switch (Style.BreakBeforeBraces) {
|
|
switch (Style.BreakBeforeBraces) {
|
|
case FormatStyle::BS_Linux:
|
|
case FormatStyle::BS_Linux:
|
|
Expanded.BraceWrapping.AfterClass = true;
|
|
Expanded.BraceWrapping.AfterClass = true;
|
|
@@ -687,8 +687,8 @@ FormatStyle getLLVMStyle(FormatStyle::LanguageKind Language) {
|
|
LLVMStyle.BreakBeforeTernaryOperators = true;
|
|
LLVMStyle.BreakBeforeTernaryOperators = true;
|
|
LLVMStyle.BreakBeforeBraces = FormatStyle::BS_Attach;
|
|
LLVMStyle.BreakBeforeBraces = FormatStyle::BS_Attach;
|
|
LLVMStyle.BraceWrapping = {false, false, false, false, false, false,
|
|
LLVMStyle.BraceWrapping = {false, false, false, false, false, false,
|
|
- false, false, false, false, false,
|
|
|
|
- false, false, true, true, true};
|
|
|
|
|
|
+ false, false, false, false, false, false,
|
|
|
|
+ false, true, true, true};
|
|
LLVMStyle.BreakAfterJavaFieldAnnotations = false;
|
|
LLVMStyle.BreakAfterJavaFieldAnnotations = false;
|
|
LLVMStyle.BreakConstructorInitializers = FormatStyle::BCIS_BeforeColon;
|
|
LLVMStyle.BreakConstructorInitializers = FormatStyle::BCIS_BeforeColon;
|
|
LLVMStyle.BreakInheritanceList = FormatStyle::BILS_BeforeColon;
|
|
LLVMStyle.BreakInheritanceList = FormatStyle::BILS_BeforeColon;
|
|
@@ -1774,8 +1774,8 @@ FindCursorIndex(const SmallVectorImpl<IncludeDirective> &Includes,
|
|
static void sortCppIncludes(const FormatStyle &Style,
|
|
static void sortCppIncludes(const FormatStyle &Style,
|
|
const SmallVectorImpl<IncludeDirective> &Includes,
|
|
const SmallVectorImpl<IncludeDirective> &Includes,
|
|
ArrayRef<tooling::Range> Ranges, StringRef FileName,
|
|
ArrayRef<tooling::Range> Ranges, StringRef FileName,
|
|
- StringRef Code,
|
|
|
|
- tooling::Replacements &Replaces, unsigned *Cursor) {
|
|
|
|
|
|
+ StringRef Code, tooling::Replacements &Replaces,
|
|
|
|
+ unsigned *Cursor) {
|
|
unsigned IncludesBeginOffset = Includes.front().Offset;
|
|
unsigned IncludesBeginOffset = Includes.front().Offset;
|
|
unsigned IncludesEndOffset =
|
|
unsigned IncludesEndOffset =
|
|
Includes.back().Offset + Includes.back().Text.size();
|
|
Includes.back().Offset + Includes.back().Text.size();
|