clang 20.0.0git
Public Member Functions | Public Attributes | List of all members
clang::format::FormatStyle::TrailingCommentsAlignmentStyle Struct Reference

Alignment options. More...

#include "clang/Format/Format.h"

Public Member Functions

bool operator== (const TrailingCommentsAlignmentStyle &R) const
 
bool operator!= (const TrailingCommentsAlignmentStyle &R) const
 

Public Attributes

TrailingCommentsAlignmentKinds Kind
 Specifies the way to align trailing comments.
 
unsigned OverEmptyLines
 How many empty lines to apply alignment.
 

Detailed Description

Alignment options.

Definition at line 583 of file Format.h.

Member Function Documentation

◆ operator!=()

bool clang::format::FormatStyle::TrailingCommentsAlignmentStyle::operator!= ( const TrailingCommentsAlignmentStyle R) const
inline

Definition at line 613 of file Format.h.

◆ operator==()

bool clang::format::FormatStyle::TrailingCommentsAlignmentStyle::operator== ( const TrailingCommentsAlignmentStyle R) const
inline

Definition at line 610 of file Format.h.

References Kind, and OverEmptyLines.

Member Data Documentation

◆ Kind

TrailingCommentsAlignmentKinds clang::format::FormatStyle::TrailingCommentsAlignmentStyle::Kind

Specifies the way to align trailing comments.

Definition at line 585 of file Format.h.

Referenced by clang::format::getGoogleStyle(), clang::format::getLLVMStyle(), clang::format::getWebKitStyle(), and operator==().

◆ OverEmptyLines

unsigned clang::format::FormatStyle::TrailingCommentsAlignmentStyle::OverEmptyLines

How many empty lines to apply alignment.

When both MaxEmptyLinesToKeep and OverEmptyLines are set to 2, it formats like below.

int a; // all these
int ab; // comments are
int abcdef; // aligned

When MaxEmptyLinesToKeep is set to 2 and OverEmptyLines is set to 1, it formats like below.

int a; // these are
int ab; // aligned
int abcdef; // but this isn't

Definition at line 608 of file Format.h.

Referenced by clang::format::getLLVMStyle(), and operator==().


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