clang 22.0.0git
clang::KeepEmptyLinesStyle Struct Reference

Options regarding which empty lines are kept. More...

#include "clang/Format/Format.h"

Public Member Functions

bool operator== (const KeepEmptyLinesStyle &R) const

Public Attributes

bool AtEndOfFile
 Keep empty lines at end of file.
bool AtStartOfBlock
 Keep empty lines at start of a block.
bool AtStartOfFile
 Keep empty lines at start of file.

Detailed Description

Options regarding which empty lines are kept.

For example, the config below will remove empty lines at start of the file, end of the file, and start of blocks.

AtEndOfFile: false
KeepEmptyLinesStyle KeepEmptyLines
Which empty lines are kept. See MaxEmptyLinesToKeep for how many consecutive empty lines are kept.
Definition Format.h:3453
bool AtStartOfBlock
Keep empty lines at start of a block.
Definition Format.h:3441
bool AtStartOfFile
Keep empty lines at start of file.
Definition Format.h:3443
bool AtEndOfFile
Keep empty lines at end of file.
Definition Format.h:3432

Definition at line 3430 of file Format.h.

Member Function Documentation

◆ operator==()

bool clang::KeepEmptyLinesStyle::operator== ( const KeepEmptyLinesStyle & R) const
inline

Definition at line 3444 of file Format.h.

References AtEndOfFile, AtStartOfBlock, and AtStartOfFile.

Member Data Documentation

◆ AtEndOfFile

bool clang::KeepEmptyLinesStyle::AtEndOfFile

Keep empty lines at end of file.

Definition at line 3432 of file Format.h.

Referenced by operator==().

◆ AtStartOfBlock

bool clang::KeepEmptyLinesStyle::AtStartOfBlock

Keep empty lines at start of a block.

true: false:
if (foo) { vs. if (foo) {
bar();
bar(); }
}

Definition at line 3441 of file Format.h.

Referenced by operator==().

◆ AtStartOfFile

bool clang::KeepEmptyLinesStyle::AtStartOfFile

Keep empty lines at start of file.

Definition at line 3443 of file Format.h.

Referenced by operator==().


The documentation for this struct was generated from the following file: