14#ifndef LLVM_CLANG_FORMAT_FORMAT_H
15#define LLVM_CLANG_FORMAT_FORMAT_H
21#include "llvm/ADT/ArrayRef.h"
22#include "llvm/Support/Regex.h"
23#include "llvm/Support/SourceMgr.h"
25#include <system_error>
48 const char *
name()
const noexcept override;
49 std::string
message(
int EV)
const override;
60 std::string InheritConfig;
64 int AccessModifierOffset;
87 bool AlignAfterOpenBracket;
90 enum ArrayInitializerAlignmentStyle : int8_t {
123 ArrayInitializerAlignmentStyle AlignArrayOfStructures;
145 struct AlignConsecutiveStyle {
183 bool AcrossEmptyLines;
222 bool AlignFunctionDeclarations;
238 bool AlignFunctionPointers;
258 bool operator==(
const AlignConsecutiveStyle &R)
const {
259 return Enabled == R.Enabled && AcrossEmptyLines == R.AcrossEmptyLines &&
260 AcrossComments == R.AcrossComments &&
261 AlignCompound == R.AlignCompound &&
262 AlignFunctionDeclarations == R.AlignFunctionDeclarations &&
263 AlignFunctionPointers == R.AlignFunctionPointers &&
264 PadOperators == R.PadOperators;
266 bool operator!=(
const AlignConsecutiveStyle &R)
const {
267 return !(*
this == R);
280 AlignConsecutiveStyle AlignConsecutiveAssignments;
292 AlignConsecutiveStyle AlignConsecutiveBitFields;
304 AlignConsecutiveStyle AlignConsecutiveDeclarations;
317 AlignConsecutiveStyle AlignConsecutiveMacros;
321 struct ShortCaseStatementsAlignmentStyle {
357 bool AcrossEmptyLines;
393 bool AlignCaseArrows;
411 bool AlignCaseColons;
412 bool operator==(
const ShortCaseStatementsAlignmentStyle &R)
const {
413 return Enabled ==
R.Enabled && AcrossEmptyLines ==
R.AcrossEmptyLines &&
414 AcrossComments ==
R.AcrossComments &&
415 AlignCaseArrows ==
R.AlignCaseArrows &&
416 AlignCaseColons ==
R.AlignCaseColons;
433 ShortCaseStatementsAlignmentStyle AlignConsecutiveShortCaseStatements;
448 AlignConsecutiveStyle AlignConsecutiveTableGenBreakingDAGArgColons;
458 AlignConsecutiveStyle AlignConsecutiveTableGenCondOperatorColons;
468 AlignConsecutiveStyle AlignConsecutiveTableGenDefinitionColons;
471 enum EscapedNewlineAlignmentStyle : int8_t {
496 ENAS_LeftWithLastLine,
509 EscapedNewlineAlignmentStyle AlignEscapedNewlines;
512 enum OperandAlignmentStyle : int8_t {
542 OAS_AlignAfterOperator,
548 OperandAlignmentStyle AlignOperands;
551 enum TrailingCommentsAlignmentKinds : int8_t {
582 struct TrailingCommentsAlignmentStyle {
584 TrailingCommentsAlignmentKinds
Kind;
607 unsigned OverEmptyLines;
616 bool AlignPPAndNotPP;
618 bool operator==(
const TrailingCommentsAlignmentStyle &R)
const {
619 return Kind ==
R.Kind && OverEmptyLines ==
R.OverEmptyLines &&
620 AlignPPAndNotPP ==
R.AlignPPAndNotPP;
622 bool operator!=(
const TrailingCommentsAlignmentStyle &R)
const {
623 return !(*
this ==
R);
645 TrailingCommentsAlignmentStyle AlignTrailingComments;
662 bool AllowAllArgumentsOnNextLine;
685 bool AllowAllParametersOfDeclarationOnNextLine;
688 enum BreakBeforeNoexceptSpecifierStyle : int8_t {
726 BreakBeforeNoexceptSpecifierStyle AllowBreakBeforeNoexceptSpecifier;
732 bool AllowBreakBeforeQtProperty;
736 enum ShortBlockStyle : int8_t {
765 ShortBlockStyle AllowShortBlocksOnASingleLine;
778 bool AllowShortCaseExpressionOnASingleLine;
792 bool AllowShortCaseLabelsOnASingleLine;
811 bool AllowShortCompoundRequirementOnASingleLine;
825 bool AllowShortEnumsOnASingleLine;
896 struct ShortFunctionStyle {
929 bool operator==(
const ShortFunctionStyle &R)
const {
930 return Empty ==
R.Empty && Inline ==
R.Inline &&
Other ==
R.Other;
932 bool operator!=(
const ShortFunctionStyle &R)
const {
return !(*
this ==
R); }
934 ShortFunctionStyle(
bool Empty,
bool Inline,
bool Other)
936 bool isAll()
const {
return Empty && Inline &&
Other; }
937 static ShortFunctionStyle setEmptyOnly() {
938 return ShortFunctionStyle(
true,
false,
false);
940 static ShortFunctionStyle setEmptyAndInline() {
941 return ShortFunctionStyle(
true,
true,
false);
943 static ShortFunctionStyle setInlineOnly() {
944 return ShortFunctionStyle(
false,
true,
false);
946 static ShortFunctionStyle setAll() {
947 return ShortFunctionStyle(
true,
true,
true);
954 ShortFunctionStyle AllowShortFunctionsOnASingleLine;
957 enum ShortIfStyle : int8_t {
1025 ShortIfStyle AllowShortIfStatementsOnASingleLine;
1029 enum ShortLambdaStyle : int8_t {
1059 ShortLambdaStyle AllowShortLambdasOnASingleLine;
1064 bool AllowShortLoopsOnASingleLine;
1068 bool AllowShortNamespacesOnASingleLine;
1072 enum ShortRecordStyle : int8_t {
1077 SRS_EmptyAndAttached,
1098 ShortRecordStyle AllowShortRecordOnASingleLine;
1102 enum DefinitionReturnTypeBreakingStyle : int8_t {
1114 enum ReturnTypeBreakingStyle : int8_t {
1139 RTBS_ExceptShortType,
1189 RTBS_AllDefinitions,
1203 RTBS_TopLevelDefinitions,
1209 DefinitionReturnTypeBreakingStyle AlwaysBreakAfterDefinitionReturnType;
1229 bool AlwaysBreakBeforeMultilineStrings;
1232 enum BreakTemplateDeclarationsStyle : int8_t {
1299 std::vector<std::string> AttributeMacros;
1319 bool BinPackLongBracedList;
1326 enum BitFieldColonSpacingStyle : int8_t {
1352 BitFieldColonSpacingStyle BitFieldColonSpacing;
1385 int BracedInitializerIndentWidth;
1388 enum BraceWrappingAfterControlStatementStyle : int8_t {
1428 struct BraceWrappingFlags {
1444 bool AfterCaseLabel;
1457 BraceWrappingAfterControlStatementStyle AfterControlStatement;
1501 bool AfterNamespace;
1507 bool AfterObjCDeclaration;
1549 bool AfterExternBlock;
1596 bool BeforeLambdaBody;
1626 bool SplitEmptyFunction;
1638 bool SplitEmptyRecord;
1650 bool SplitEmptyNamespace;
1666 BraceWrappingFlags BraceWrapping;
1679 bool BreakAdjacentStringLiterals;
1683 enum AttributeBreakingStyle : int8_t {
1781 AttributeBreakingStyle BreakAfterAttributes;
1792 bool BreakAfterOpenBracketBracedList;
1802 bool BreakAfterOpenBracketFunction;
1812 bool BreakAfterOpenBracketIf;
1822 bool BreakAfterOpenBracketLoop;
1832 bool BreakAfterOpenBracketSwitch;
1836 ReturnTypeBreakingStyle BreakAfterReturnType;
1859 enum BinPackStyle : int8_t {
1869 enum BinaryOperatorStyle : int8_t {
1910 BinaryOperatorStyle BreakBeforeBinaryOperators;
1913 enum BraceBreakingStyle : int8_t {
2345 BraceBreakingStyle BreakBeforeBraces;
2358 bool BreakBeforeCloseBracketBracedList;
2369 bool BreakBeforeCloseBracketFunction;
2382 bool BreakBeforeCloseBracketIf;
2395 bool BreakBeforeCloseBracketLoop;
2408 bool BreakBeforeCloseBracketSwitch;
2411 enum BreakBeforeConceptDeclarationsStyle : int8_t {
2432 BreakBeforeConceptDeclarationsStyle BreakBeforeConceptDeclarations;
2435 enum BreakBeforeInlineASMColonStyle : int8_t {
2449 BBIAS_OnlyMultiline,
2461 BreakBeforeInlineASMColonStyle BreakBeforeInlineASMColon;
2488 bool BreakBeforeTemplateCloser;
2503 bool BreakBeforeTernaryOperators;
2506 enum BreakBinaryOperationsStyle : int8_t {
2533 BBO_RespectPrecedence
2538 struct BinaryOperationBreakRule {
2541 std::vector<tok::TokenKind> Operators;
2543 BreakBinaryOperationsStyle Style;
2547 unsigned MinChainLength;
2548 bool operator==(
const BinaryOperationBreakRule &R)
const {
2549 return Operators ==
R.Operators && Style ==
R.Style &&
2550 MinChainLength ==
R.MinChainLength;
2552 bool operator!=(
const BinaryOperationBreakRule &R)
const {
2553 return !(*
this ==
R);
2572 struct BreakBinaryOperationsOptions {
2574 BreakBinaryOperationsStyle
Default;
2576 std::vector<BinaryOperationBreakRule> PerOperator;
2577 const BinaryOperationBreakRule *
2578 findRuleForOperator(tok::TokenKind Kind)
const {
2579 for (
const auto &Rule : PerOperator) {
2580 if (llvm::find(
Rule.Operators, Kind) !=
Rule.Operators.end())
2585 if (Kind == tok::greater &&
2586 llvm::find(
Rule.Operators, tok::greatergreater) !=
2587 Rule.Operators.end()) {
2593 BreakBinaryOperationsStyle getStyleForOperator(tok::TokenKind Kind)
const {
2594 if (
const auto *Rule = findRuleForOperator(Kind))
2598 unsigned getMinChainLengthForOperator(tok::TokenKind Kind)
const {
2599 if (
const auto *Rule = findRuleForOperator(Kind))
2600 return Rule->MinChainLength;
2603 bool operator==(
const BreakBinaryOperationsOptions &R)
const {
2604 return Default ==
R.Default && PerOperator ==
R.PerOperator;
2606 bool operator!=(
const BreakBinaryOperationsOptions &R)
const {
2607 return !(*
this ==
R);
2613 BreakBinaryOperationsOptions BreakBinaryOperations;
2616 enum BreakConstructorInitializersStyle : int8_t {
2649 BreakConstructorInitializersStyle BreakConstructorInitializers;
2663 bool BreakFunctionDefinitionParameters;
2673 bool BreakAfterJavaFieldAnnotations;
2716 bool BreakStringLiterals;
2724 unsigned ColumnLimit;
2734 std::string CommentPragmas;
2737 enum BreakInheritanceListStyle : int8_t {
2774 BreakInheritanceListStyle BreakInheritanceList;
2778 BreakTemplateDeclarationsStyle BreakTemplateDeclarations;
2802 bool CompactNamespaces;
2812 unsigned ConstructorInitializerIndentWidth;
2823 unsigned ContinuationIndentWidth;
2826 enum BracedListStyle : int8_t {
2880 BLS_AlignFirstComment,
2885 BracedListStyle Cpp11BracedListStyle;
2898 bool DerivePointerAlignment;
2907 enum EmptyLineAfterAccessModifierStyle : int8_t {
2953 EmptyLineAfterAccessModifierStyle EmptyLineAfterAccessModifier;
2956 enum EmptyLineBeforeAccessModifierStyle : int8_t {
2991 ELBAMS_LogicalBlock,
3016 EmptyLineBeforeAccessModifierStyle EmptyLineBeforeAccessModifier;
3019 enum EnumTrailingCommaStyle : int8_t {
3049 EnumTrailingCommaStyle EnumTrailingComma;
3064 bool ExperimentalAutoDetectBinPacking;
3080 bool FixNamespaceComments;
3098 std::vector<std::string> ForEachMacros;
3100 tooling::IncludeStyle IncludeStyle;
3121 std::vector<std::string> IfMacros;
3148 bool IndentAccessModifiers;
3171 bool IndentCaseBlocks;
3190 bool IndentCaseLabels;
3203 bool IndentExportBlock;
3206 enum IndentExternBlockStyle : int8_t {
3224 IEBS_AfterExternBlock,
3243 IndentExternBlockStyle IndentExternBlock;
3246 enum IndentGotoLabelStyle : int8_t {
3301 IndentGotoLabelStyle IndentGotoLabels;
3304 enum PPDirectiveIndentStyle : int8_t {
3348 PPDirectiveIndentStyle IndentPPDirectives;
3371 bool IndentRequiresClause;
3385 unsigned IndentWidth;
3399 bool IndentWrappedFunctionNames;
3435 bool InsertNewlineAtEOF;
3438 enum TrailingCommaStyle : int8_t {
3465 TrailingCommaStyle InsertTrailingCommas;
3497 struct IntegerLiteralSeparatorStyle {
3513 int8_t BinaryMinDigitsInsert;
3525 int8_t BinaryMaxDigitsRemove;
3540 int8_t DecimalMinDigitsInsert;
3552 int8_t DecimalMaxDigitsRemove;
3568 int8_t HexMinDigitsInsert;
3581 int8_t HexMaxDigitsRemove;
3582 bool operator==(
const IntegerLiteralSeparatorStyle &R)
const {
3584 BinaryMinDigitsInsert ==
R.BinaryMinDigitsInsert &&
3585 BinaryMaxDigitsRemove ==
R.BinaryMaxDigitsRemove &&
3587 DecimalMinDigitsInsert ==
R.DecimalMinDigitsInsert &&
3588 DecimalMaxDigitsRemove ==
R.DecimalMaxDigitsRemove &&
3589 Hex ==
R.Hex && HexMinDigitsInsert ==
R.HexMinDigitsInsert &&
3590 HexMaxDigitsRemove ==
R.HexMaxDigitsRemove;
3592 bool operator!=(
const IntegerLiteralSeparatorStyle &R)
const {
4041 return !(*
this == R);
5041 return !(*
this == R);
5417 Other.AfterFunctionDeclarationName &&
5720 return !(*
this == R);
6010 return AccessModifierOffset == R.AccessModifierOffset &&
6011 AlignAfterOpenBracket == R.AlignAfterOpenBracket &&
6012 AlignArrayOfStructures == R.AlignArrayOfStructures &&
6013 AlignConsecutiveAssignments == R.AlignConsecutiveAssignments &&
6014 AlignConsecutiveBitFields == R.AlignConsecutiveBitFields &&
6015 AlignConsecutiveDeclarations == R.AlignConsecutiveDeclarations &&
6016 AlignConsecutiveMacros == R.AlignConsecutiveMacros &&
6017 AlignConsecutiveShortCaseStatements ==
6018 R.AlignConsecutiveShortCaseStatements &&
6019 AlignConsecutiveTableGenBreakingDAGArgColons ==
6020 R.AlignConsecutiveTableGenBreakingDAGArgColons &&
6021 AlignConsecutiveTableGenCondOperatorColons ==
6022 R.AlignConsecutiveTableGenCondOperatorColons &&
6023 AlignConsecutiveTableGenDefinitionColons ==
6024 R.AlignConsecutiveTableGenDefinitionColons &&
6025 AlignEscapedNewlines == R.AlignEscapedNewlines &&
6026 AlignOperands == R.AlignOperands &&
6027 AlignTrailingComments == R.AlignTrailingComments &&
6028 AllowAllArgumentsOnNextLine == R.AllowAllArgumentsOnNextLine &&
6029 AllowAllParametersOfDeclarationOnNextLine ==
6030 R.AllowAllParametersOfDeclarationOnNextLine &&
6031 AllowBreakBeforeNoexceptSpecifier ==
6032 R.AllowBreakBeforeNoexceptSpecifier &&
6033 AllowBreakBeforeQtProperty == R.AllowBreakBeforeQtProperty &&
6034 AllowShortBlocksOnASingleLine == R.AllowShortBlocksOnASingleLine &&
6035 AllowShortCaseExpressionOnASingleLine ==
6036 R.AllowShortCaseExpressionOnASingleLine &&
6037 AllowShortCaseLabelsOnASingleLine ==
6038 R.AllowShortCaseLabelsOnASingleLine &&
6039 AllowShortCompoundRequirementOnASingleLine ==
6040 R.AllowShortCompoundRequirementOnASingleLine &&
6041 AllowShortEnumsOnASingleLine == R.AllowShortEnumsOnASingleLine &&
6042 AllowShortFunctionsOnASingleLine ==
6043 R.AllowShortFunctionsOnASingleLine &&
6044 AllowShortIfStatementsOnASingleLine ==
6045 R.AllowShortIfStatementsOnASingleLine &&
6046 AllowShortLambdasOnASingleLine == R.AllowShortLambdasOnASingleLine &&
6047 AllowShortLoopsOnASingleLine == R.AllowShortLoopsOnASingleLine &&
6048 AllowShortNamespacesOnASingleLine ==
6049 R.AllowShortNamespacesOnASingleLine &&
6050 AllowShortRecordOnASingleLine == R.AllowShortRecordOnASingleLine &&
6051 AlwaysBreakBeforeMultilineStrings ==
6052 R.AlwaysBreakBeforeMultilineStrings &&
6053 AttributeMacros == R.AttributeMacros &&
6054 BinPackLongBracedList == R.BinPackLongBracedList &&
6055 BitFieldColonSpacing == R.BitFieldColonSpacing &&
6056 BracedInitializerIndentWidth == R.BracedInitializerIndentWidth &&
6057 BreakAdjacentStringLiterals == R.BreakAdjacentStringLiterals &&
6058 BreakAfterAttributes == R.BreakAfterAttributes &&
6059 BreakAfterJavaFieldAnnotations == R.BreakAfterJavaFieldAnnotations &&
6060 BreakAfterOpenBracketBracedList ==
6061 R.BreakAfterOpenBracketBracedList &&
6062 BreakAfterOpenBracketFunction == R.BreakAfterOpenBracketFunction &&
6063 BreakAfterOpenBracketIf == R.BreakAfterOpenBracketIf &&
6064 BreakAfterOpenBracketLoop == R.BreakAfterOpenBracketLoop &&
6065 BreakAfterOpenBracketSwitch == R.BreakAfterOpenBracketSwitch &&
6066 BreakAfterReturnType == R.BreakAfterReturnType &&
6067 BreakArrays == R.BreakArrays &&
6068 BreakBeforeBinaryOperators == R.BreakBeforeBinaryOperators &&
6069 BreakBeforeBraces == R.BreakBeforeBraces &&
6070 BreakBeforeCloseBracketBracedList ==
6071 R.BreakBeforeCloseBracketBracedList &&
6072 BreakBeforeCloseBracketFunction ==
6073 R.BreakBeforeCloseBracketFunction &&
6074 BreakBeforeCloseBracketIf == R.BreakBeforeCloseBracketIf &&
6075 BreakBeforeCloseBracketLoop == R.BreakBeforeCloseBracketLoop &&
6076 BreakBeforeCloseBracketSwitch == R.BreakBeforeCloseBracketSwitch &&
6077 BreakBeforeConceptDeclarations == R.BreakBeforeConceptDeclarations &&
6078 BreakBeforeInlineASMColon == R.BreakBeforeInlineASMColon &&
6079 BreakBeforeTemplateCloser == R.BreakBeforeTemplateCloser &&
6080 BreakBeforeTernaryOperators == R.BreakBeforeTernaryOperators &&
6081 BreakBinaryOperations == R.BreakBinaryOperations &&
6082 BreakConstructorInitializers == R.BreakConstructorInitializers &&
6083 BreakFunctionDefinitionParameters ==
6084 R.BreakFunctionDefinitionParameters &&
6085 BreakInheritanceList == R.BreakInheritanceList &&
6086 BreakStringLiterals == R.BreakStringLiterals &&
6087 BreakTemplateDeclarations == R.BreakTemplateDeclarations &&
6088 ColumnLimit == R.ColumnLimit && CommentPragmas == R.CommentPragmas &&
6089 CompactNamespaces == R.CompactNamespaces &&
6090 ConstructorInitializerIndentWidth ==
6091 R.ConstructorInitializerIndentWidth &&
6092 ContinuationIndentWidth == R.ContinuationIndentWidth &&
6093 Cpp11BracedListStyle == R.Cpp11BracedListStyle &&
6094 DerivePointerAlignment == R.DerivePointerAlignment &&
6095 DisableFormat == R.DisableFormat &&
6096 EmptyLineAfterAccessModifier == R.EmptyLineAfterAccessModifier &&
6097 EmptyLineBeforeAccessModifier == R.EmptyLineBeforeAccessModifier &&
6098 EnumTrailingComma == R.EnumTrailingComma &&
6099 ExperimentalAutoDetectBinPacking ==
6100 R.ExperimentalAutoDetectBinPacking &&
6101 FixNamespaceComments == R.FixNamespaceComments &&
6102 ForEachMacros == R.ForEachMacros &&
6104 IncludeStyle.IncludeCategories == R.IncludeStyle.IncludeCategories &&
6106 R.IncludeStyle.IncludeIsMainRegex &&
6108 R.IncludeStyle.IncludeIsMainSourceRegex &&
6109 IncludeStyle.MainIncludeChar == R.IncludeStyle.MainIncludeChar &&
6110 IndentAccessModifiers == R.IndentAccessModifiers &&
6111 IndentCaseBlocks == R.IndentCaseBlocks &&
6112 IndentCaseLabels == R.IndentCaseLabels &&
6113 IndentExportBlock == R.IndentExportBlock &&
6114 IndentExternBlock == R.IndentExternBlock &&
6115 IndentGotoLabels == R.IndentGotoLabels &&
6116 IndentPPDirectives == R.IndentPPDirectives &&
6117 IndentRequiresClause == R.IndentRequiresClause &&
6118 IndentWidth == R.IndentWidth &&
6119 IndentWrappedFunctionNames == R.IndentWrappedFunctionNames &&
6120 InsertBraces == R.InsertBraces &&
6121 InsertNewlineAtEOF == R.InsertNewlineAtEOF &&
6132 R.MacrosSkippedByRemoveParentheses &&
6140 R.ObjCBreakBeforeNestedBlockParam &&
6143 R.ObjCSpaceAfterMethodDeclarationPrefix &&
6152 R.PenaltyBreakBeforeFirstCallParameter &&
6160 R.PenaltyBreakTemplateDeclaration &&
6170 R.RemoveEmptyLinesInUnwrappedLines &&
6188 R.SpaceBeforeCtorInitializerColon &&
6195 R.SpaceBeforeRangeBasedForLoopColon &&
6202 R.SpacesInLineCommentPrefix.Minimum &&
6204 R.SpacesInLineCommentPrefix.Maximum &&
6212 R.TableGenBreakingDAGArgOperators &&
6218 R.VerilogBreakBetweenInstancePorts &&
6233 typedef std::map<LanguageKind, FormatStyle>
MapType;
6248 std::shared_ptr<MapType> Styles;
6252 const FormatStyle &MainStyle,
6253 const std::vector<FormatStyle> &ConfigurationStyles);
6258 friend std::error_code
6260 bool AllowUnknownOptions,
6261 llvm::SourceMgr::DiagHandlerTy DiagHandler,
6262 void *DiagHandlerCtxt,
bool IsDotHFile);
6308 FormatStyle *Style);
6326 bool AllowUnknownOptions =
false,
6327 llvm::SourceMgr::DiagHandlerTy DiagHandler =
nullptr,
6328 void *DiagHandlerCtx =
nullptr,
bool IsDotHFile =
false);
6332 bool AllowUnknownOptions =
false,
6333 bool IsDotHFile =
false) {
6335 AllowUnknownOptions,
nullptr,
6336 nullptr, IsDotHFile);
6344tooling::Replacements
sortIncludes(
const FormatStyle &Style, StringRef Code,
6347 unsigned *Cursor =
nullptr);
6354 const FormatStyle &Style);
6371 const FormatStyle &Style);
6396tooling::Replacements
reformat(
const FormatStyle &Style, StringRef Code,
6404tooling::Replacements
reformat(
const FormatStyle &Style, StringRef Code,
6406 StringRef
FileName,
bool *IncompleteFormat);
6412tooling::Replacements
cleanup(
const FormatStyle &Style, StringRef Code,
6495 StringRef Code =
"", llvm::vfs::FileSystem *FS =
nullptr,
6496 bool AllowUnknownOptions =
false,
6497 llvm::SourceMgr::DiagHandlerTy DiagHandler =
nullptr);
6506 case FormatStyle::LK_C:
6508 case FormatStyle::LK_Cpp:
6510 case FormatStyle::LK_CSharp:
6512 case FormatStyle::LK_ObjC:
6513 return "Objective-C";
6514 case FormatStyle::LK_Java:
6516 case FormatStyle::LK_JavaScript:
6517 return "JavaScript";
6518 case FormatStyle::LK_Json:
6520 case FormatStyle::LK_Proto:
6522 case FormatStyle::LK_TableGen:
6524 case FormatStyle::LK_TextProto:
6526 case FormatStyle::LK_Verilog:
6540struct std::is_error_code_enum<
clang::format::ParseError> : std::true_type {};
Defines the clang::LangOptions interface.
Defines the clang::TokenKind enum and support functions.
bool operator!=(const CommonEntityInfo &LHS, const CommonEntityInfo &RHS)
const Regex Rule("(.+)/(.+)\\.framework/")
bool operator==(const ValueType &a, const ValueType &b)
The JSON file list parser is used to communicate input to InstallAPI.
unsigned TabWidth
The number of columns used for tab stops.
unsigned ObjCBlockIndentWidth
The number of characters to use for indentation of ObjC blocks.
bool ObjCBreakBeforeNestedBlockParam
Break parameters list into lines when there is nested block parameters in a function call.
bool SpaceAfterTemplateKeyword
If true, a space will be inserted after the template keyword.
WrapNamespaceBodyWithEmptyLinesStyle WrapNamespaceBodyWithEmptyLines
Wrap namespace body with empty lines.
ReferenceAlignmentStyle ReferenceAlignment
Reference alignment style (overrides PointerAlignment for references).
ReflowCommentsStyle
Types of comment reflow style.
@ RCS_IndentOnly
Only apply indentation rules, moving comments left or right, without changing formatting inside the c...
@ RCS_Always
Apply indentation rules and reflow long comments into new lines, trying to obey the ColumnLimit.
@ RCS_Never
Leave comments untouched.
int PPIndentWidth
The number of columns to use for indentation of preprocessor statements. When set to -1 (default) Ind...
SeparateDefinitionStyle
The style if definition blocks should be separated.
@ SDS_Never
Remove any empty line between definition blocks.
@ SDS_Always
Insert an empty line between definition blocks.
@ SDS_Leave
Leave definition blocks as they are.
SpacesInParensStyle SpacesInParens
If true, spaces will be inserted after ( and before ). This option is deprecated. The previous behavi...
bool isJavaScript() const
DAGArgStyle
Different ways to control the format inside TableGen DAGArg.
@ DAS_BreakAll
Break inside DAGArg after the operator and the all elements.
@ DAS_DontBreak
Never break inside DAGArg.
@ DAS_BreakElements
Break inside DAGArg after each list element but for the last. This aligns to the first element.
bool VerilogBreakBetweenInstancePorts
For Verilog, put each port on its own line in module instantiations.
std::vector< std::string > JavaImportGroups
A vector of prefixes ordered by the desired groups for Java imports.
unsigned PenaltyBreakTemplateDeclaration
The penalty for breaking after template declaration.
SortJavaStaticImportOptions SortJavaStaticImport
When sorting Java imports, by default static imports are placed before non-static imports....
RequiresClausePositionStyle
The possible positions for the requires clause. The IndentRequires option is only used if the require...
@ RCPS_WithPreceding
Try to put the clause together with the preceding part of a declaration. For class templates: stick t...
@ RCPS_SingleLine
Try to put everything in the same line if possible. Otherwise normal line breaking rules take over.
@ RCPS_OwnLineWithBrace
As with OwnLine, except, unless otherwise prohibited, place a following open brace (of a function def...
@ RCPS_OwnLine
Always put the requires clause on its own line (possibly followed by a semicolon).
@ RCPS_WithFollowing
Try to put the requires clause together with the class or function declaration.
std::vector< RawStringFormat > RawStringFormats
Defines hints for detecting supported languages code blocks in raw strings.
UseTabStyle
This option is deprecated. See LF and CRLF of LineEnding.
@ UT_ForContinuationAndIndentation
Fill all leading whitespace with tabs, and use spaces for alignment that appears within a line (e....
@ UT_ForIndentation
Use tabs only for indentation.
@ UT_Always
Use tabs whenever we need to fill whitespace that spans at least from one tab stop to the next one.
@ UT_AlignWithSpaces
Use tabs for line continuation and indentation, and spaces for alignment.
BinPackParametersStyle
Different ways to try to fit all parameters on a line.
@ BPPS_UseBreakAfter
Use the BreakAfter option to handle parameter packing instead. If the BreakAfter limit is not exceede...
@ BPPS_BinPack
Bin-pack parameters.
@ BPPS_AlwaysOnePerLine
Always put each parameter on its own line.
@ BPPS_OnePerLine
Put all parameters on the current line if they fit. Otherwise, put each one on its own line.
bool ObjCSpaceAfterMethodDeclarationPrefix
Add or remove a space between the '-'/'+' and the return type in Objective-C method declarations....
LanguageStandard Standard
Parse and format C++ constructs compatible with this standard.
PointerAlignmentStyle
The &, && and * alignment style.
@ PAS_Right
Align pointer to the right.
@ PAS_Middle
Align pointer in the middle.
@ PAS_Left
Align pointer to the left.
SpaceBeforeParensCustom SpaceBeforeParensOptions
Control of individual space before parentheses.
std::vector< std::string > Macros
A list of macros of the form <definition>=<expansion> .
RequiresExpressionIndentationKind RequiresExpressionIndentation
The indentation used for requires expression bodies.
SpaceInEmptyBracesStyle SpaceInEmptyBraces
Specifies when to insert a space in empty braces.
SpacesInLineComment SpacesInLineCommentPrefix
How many spaces are allowed at the start of a line comment. To disable the maximum set it to -1,...
bool SkipMacroDefinitionBody
Do not format macro definition body.
PointerAlignmentStyle PointerAlignment
Pointer and reference alignment style.
std::optional< FormatStyle > GetLanguageStyle(LanguageKind Language) const
PackConstructorInitializersStyle
Different ways to try to fit all constructor initializers on a line.
@ PCIS_CurrentLine
Put all constructor initializers on the current line if they fit. Otherwise, put each one on its own ...
@ PCIS_Never
Always put each constructor initializer on its own line.
@ PCIS_BinPack
Bin-pack constructor initializers.
@ PCIS_NextLine
Same as PCIS_CurrentLine except that if all constructor initializers do not fit on the current line,...
@ PCIS_NextLineOnly
Put all constructor initializers on the next line if they fit. Otherwise, put each one on its own lin...
bool SpaceBeforeRangeBasedForLoopColon
If false, spaces will be removed before range-based for loop colon.
unsigned PenaltyReturnTypeOnItsOwnLine
Penalty for putting the return type of a function onto its own line.
bool SpaceBeforeCaseColon
If false, spaces will be removed before case colon.
std::vector< std::string > StatementAttributeLikeMacros
Macros which are ignored in front of a statement, as if they were an attribute. So that they are not ...
SpacesInParensStyle
Different ways to put a space before opening and closing parentheses.
@ SIPO_Never
Never put a space in parentheses.
@ SIPO_Custom
Configure each individual space in parentheses in SpacesInParensOptions.
bool operator==(const CallGraphNode::CallRecord &LHS, const CallGraphNode::CallRecord &RHS)
JavaScriptQuoteStyle JavaScriptQuotes
The JavaScriptQuoteStyle to use for JavaScript strings.
NumericLiteralComponentStyle
Control over each component in a numeric literal.
@ NLCS_Leave
Leave this component of the literal as is.
@ NLCS_Upper
Format this component with uppercase characters.
@ NLCS_Lower
Format this component with lowercase characters.
RequiresExpressionIndentationKind
Indentation logic for requires expression bodies.
@ REI_Keyword
Align requires expression body relative to the requires keyword.
@ REI_OuterScope
Align requires expression body relative to the indentation level of the outer scope the requires expr...
SpaceBeforeParensStyle
Different ways to put a space before opening parentheses.
@ SBPO_ControlStatementsExceptControlMacros
Same as SBPO_ControlStatements except this option doesn't apply to ForEach and If macros....
@ SBPO_ControlStatements
Put a space before opening parentheses only after control statement keywords (for/if/while....
@ SBPO_Always
Always put a space before opening parentheses, except when it's prohibited by the syntax rules (in fu...
@ SBPO_Never
This is deprecated and replaced by Custom below, with all SpaceBeforeParensOptions but AfterPlacement...
@ SBPO_Custom
Configure each individual space before parentheses in SpaceBeforeParensOptions.
@ SBPO_NonEmptyParentheses
Put a space before opening parentheses only if the parentheses are not empty.
PackParametersStyle PackParameters
Options related to packing parameters of function declarations and definitions.
std::vector< std::string > WhitespaceSensitiveMacros
A vector of macros which are whitespace-sensitive and should not be touched.
bool SpaceAfterOperatorKeyword
If true, a space will be inserted after the operator keyword.
bool ObjCSpaceAfterProperty
Add a space after @property in Objective-C, i.e. use @property (readonly) instead of @property(readon...
ReflowCommentsStyle ReflowComments
Comment reformatting style.
std::vector< std::string > TypeNames
A vector of non-keyword identifiers that should be interpreted as type names.
LineEndingStyle
Line ending style.
@ LE_DeriveCRLF
Use \r\n unless the input has more lines ending in \n.
@ LE_DeriveLF
Use \n unless the input has more lines ending in \r\n.
SpacesInAnglesStyle
Styles for adding spacing after < and before > in template argument lists.
@ SIAS_Always
Add spaces after < and before >.
@ SIAS_Never
Remove spaces after < and before >.
@ SIAS_Leave
Keep a single space after < and before > if any spaces were present. Option Standard: Cpp03 takes pre...
IntegerLiteralSeparatorStyle IntegerLiteralSeparator
Format integer literal separators (' for C/C++ and _ for C#, Java, and JavaScript).
std::vector< std::string > TableGenBreakingDAGArgOperators
Works only when TableGenBreakInsideDAGArg is not DontBreak. The string list needs to consist of ident...
bool SpaceBeforeCpp11BracedList
If true, a space will be inserted before a C++11 braced list used to initialize an object (after the ...
unsigned PenaltyExcessCharacter
The penalty for each character outside of the column limit.
SortJavaStaticImportOptions
Position for Java Static imports.
@ SJSIO_After
Static imports are placed after non-static imports.
@ SJSIO_Before
Static imports are placed before non-static imports.
PackArgumentsStyle PackArguments
Options related to packing arguments of function calls.
NamespaceIndentationKind NamespaceIndentation
The indentation used for namespaces.
bool SpaceBeforeSquareBrackets
If true, spaces will be before [. Lambdas will not be affected. Only the first [ will get a space add...
bool RemoveSemicolon
Remove semicolons after the closing braces of functions and constructors/destructors.
Language
The language for the input, used to select and validate the language standard and possible actions.
bool SpaceBeforeAssignmentOperators
If false, spaces will be removed before assignment operators.
unsigned PenaltyBreakComment
The penalty for each line break introduced inside a comment.
QualifierAlignmentStyle
Different specifiers and qualifiers alignment styles.
@ QAS_Custom
Change specifiers/qualifiers to be aligned based on QualifierOrder. With:
@ QAS_Leave
Don't change specifiers/qualifiers to either Left or Right alignment (default).
@ QAS_Left
Change specifiers/qualifiers to be left-aligned.
@ QAS_Right
Change specifiers/qualifiers to be right-aligned.
SpacesInParensCustom SpacesInParensOptions
Control of individual spaces in parentheses.
SpacesInAnglesStyle SpacesInAngles
The SpacesInAnglesStyle to use for template argument lists.
BinPackStyle ObjCBinPackProtocolList
Controls bin-packing Objective-C protocol conformance list items into as few lines as possible when t...
bool ObjCSpaceBeforeProtocolList
Add a space in front of an Objective-C protocol list, i.e. use Foo <Protocol> instead of Foo<Protocol...
bool SpacesInContainerLiterals
If true, spaces will be inserted around if/for/switch/while conditions. This option is deprecated....
std::string OneLineFormatOffRegex
A regular expression that describes markers for turning formatting off for one line....
RemoveParenthesesStyle RemoveParentheses
Remove redundant parentheses.
UseTabStyle UseTab
The way to use tab characters in the resulting file.
std::vector< std::string > ObjCPropertyAttributeOrder
The order in which ObjC property attributes should appear.
std::string MacroBlockBegin
A regular expression matching macros that start a block.
unsigned PenaltyBreakString
The penalty for each line break introduced inside a string literal.
unsigned PenaltyBreakOpenParenthesis
The penalty for breaking after (.
WrapNamespaceBodyWithEmptyLinesStyle
Different styles for wrapping namespace body with empty lines.
@ WNBWELS_Never
Remove all empty lines at the beginning and the end of namespace body.
@ WNBWELS_Always
Always have at least one empty line at the beginning and the end of namespace body except that the nu...
@ WNBWELS_Leave
Keep existing newlines at the beginning and the end of namespace body. MaxEmptyLinesToKeep still appl...
unsigned PenaltyBreakBeforeFirstCallParameter
The penalty for breaking a function call after call(.
LambdaBodyIndentationKind
Indentation logic for lambda bodies.
@ LBI_Signature
Align lambda body relative to the lambda signature. This is the default.
@ LBI_OuterScope
For statements within block scope, align lambda body relative to the indentation level of the outer s...
unsigned PenaltyBreakFirstLessLess
The penalty for breaking before the first <<.
std::vector< std::string > MacrosSkippedByRemoveParentheses
A vector of function-like macros whose invocations should be skipped by RemoveParentheses.
RequiresClausePositionStyle RequiresClausePosition
The position of the requires clause.
bool SpaceBeforeJsonColon
If true, a space will be added before a JSON colon. For other languages, e.g. JavaScript,...
bool JavaScriptWrapImports
Whether to wrap JavaScript import/export statements.
bool SpaceBeforeInheritanceColon
If false, spaces will be removed before inheritance colon.
SpaceInEmptyBracesStyle
This option is deprecated. See Block of SpaceInEmptyBraces.
@ SIEB_Block
Only insert a space in empty blocks.
@ SIEB_Always
Always insert a space in empty braces.
@ SIEB_Never
Never insert a space in empty braces.
std::vector< std::string > TypenameMacros
A vector of macros that should be interpreted as type declarations instead of as function calls.
LanguageStandard
Supported language standards for parsing and formatting C++ constructs.
@ LS_Cpp03
Parse and format as C++03. Cpp03 is a deprecated alias for c++03
@ LS_Cpp14
Parse and format as C++14.
@ LS_Cpp17
Parse and format as C++17.
@ LS_Cpp23
Parse and format as C++23.
@ LS_Cpp11
Parse and format as C++11.
@ LS_Auto
Automatic detection based on the input.
@ LS_Latest
Parse and format using the latest supported language version. Cpp11 is a deprecated alias for Latest
@ LS_Cpp20
Parse and format as C++20.
@ LS_Cpp26
Parse and format as C++26.
KeepEmptyLinesStyle KeepEmptyLines
Which empty lines are kept. See MaxEmptyLinesToKeep for how many consecutive empty lines are kept.
bool SpaceBeforeEnumUnderlyingTypeColon
If false, spaces will be removed before enum underlying type colon.
SortUsingDeclarationsOptions
Using declaration sorting options.
@ SUD_LexicographicNumeric
Using declarations are sorted in the order defined as follows: Split the strings by :: and discard an...
@ SUD_Never
Using declarations are never sorted.
@ SUD_Lexicographic
Using declarations are sorted in the order defined as follows: Split the strings by :: and discard an...
unsigned PenaltyBreakScopeResolution
The penalty for breaking after ::.
DAGArgStyle TableGenBreakInsideDAGArg
The styles of the line break inside the DAGArg in TableGen.
LambdaBodyIndentationKind LambdaBodyIndentation
The indentation style of lambda bodies. Signature (the default) causes the lambda body to be indented...
NamespaceIndentationKind
Different ways to indent namespace contents.
@ NI_None
Don't indent in namespaces.
@ NI_All
Indent in all namespaces.
@ NI_Inner
Indent only in inner namespaces (nested in other namespaces).
SeparateDefinitionStyle SeparateDefinitionBlocks
Specifies the use of empty lines to separate definition blocks, including classes,...
bool SpaceAfterCStyleCast
If true, a space is inserted after C style casts.
SpaceAroundPointerQualifiersStyle SpaceAroundPointerQualifiers
Defines in which cases to put a space before or after pointer qualifiers.
SpaceAroundPointerQualifiersStyle
Different ways to put a space before opening parentheses.
@ SAPQ_Both
Ensure that there is a space both before and after pointer qualifiers.
@ SAPQ_Default
Don't ensure spaces around pointer qualifiers and use PointerAlignment instead.
@ SAPQ_Before
Ensure that there is a space before pointer qualifiers.
@ SAPQ_After
Ensure that there is a space after pointer qualifiers.
std::vector< std::string > TemplateNames
A vector of non-keyword identifiers that should be interpreted as template names.
bool SpacesInSquareBrackets
If true, spaces will be inserted after [ and before ]. Lambdas without arguments or unspecified size ...
std::vector< std::string > StatementMacros
A vector of macros that should be interpreted as complete statements.
RemoveParenthesesStyle
Types of redundant parentheses to remove.
@ RPS_ReturnStatement
Also remove parentheses enclosing the expression in a return/co_return statement.
@ RPS_MultipleParentheses
Replace multiple parentheses with single parentheses.
@ RPS_Leave
Do not remove parentheses.
std::vector< std::string > NamespaceMacros
A vector of macros which are used to open namespace blocks.
unsigned PenaltyBreakBeforeMemberAccess
The penalty for breaking before a member access operator (., ->).
LineEndingStyle LineEnding
Line ending style (\n or \r\n) to use.
unsigned SpacesBeforeTrailingComments
If true, spaces may be inserted into (). This option is deprecated. See InEmptyParentheses of SpacesI...
bool RemoveEmptyLinesInUnwrappedLines
Remove empty lines within unwrapped lines.
unsigned MaxEmptyLinesToKeep
The maximum number of consecutive empty lines to keep.
PackConstructorInitializersStyle PackConstructorInitializers
The pack constructor initializers style to use.
SortIncludesOptions SortIncludes
Controls if and how clang-format will sort #includes.
bool SpaceAfterLogicalNot
If true, a space is inserted after the logical not operator (!).
bool KeepFormFeed
This option is deprecated. See AtEndOfFile of KeepEmptyLines.
std::string MacroBlockEnd
A regular expression matching macros that end a block.
unsigned ShortNamespaceLines
The maximal number of unwrapped lines that a short namespace spans. Defaults to 1.
std::vector< std::string > QualifierOrder
The order in which the qualifiers appear. The order is an array that can contain any of the following...
bool RemoveBracesLLVM
Remove optional braces of control statements (if, else, for, and while) in C++ according to the LLVM ...
BinPackArgumentsStyle
Different ways to try to fit all arguments on a line.
@ BPAS_UseBreakAfter
Use the BreakAfter option to handle argument packing instead. If the BreakAfter limit is not exceeded...
@ BPAS_OnePerLine
Put all arguments on the current line if they fit. Otherwise, put each one on its own line.
@ BPAS_BinPack
Bin-pack arguments.
ReferenceAlignmentStyle
The & and && alignment style.
@ RAS_Middle
Align reference in the middle.
@ RAS_Right
Align reference to the right.
@ RAS_Pointer
Align reference like PointerAlignment.
@ RAS_Left
Align reference to the left.
bool SpaceBeforeCtorInitializerColon
If false, spaces will be removed before constructor initializer colon.
unsigned PenaltyBreakAssignment
The penalty for breaking around an assignment operator.
QualifierAlignmentStyle QualifierAlignment
Different ways to arrange specifiers and qualifiers (e.g. const/volatile).
LanguageKind
Supported languages.
@ LK_Java
Should be used for Java.
@ LK_Cpp
Should be used for C++.
@ LK_TableGen
Should be used for TableGen code.
@ LK_ObjC
Should be used for Objective-C, Objective-C++.
@ LK_CSharp
Should be used for C#.
@ LK_TextProto
Should be used for Protocol Buffer messages in text format (https://developers.google....
@ LK_Json
Should be used for JSON.
@ LK_JavaScript
Should be used for JavaScript.
@ LK_Verilog
Should be used for Verilog and SystemVerilog. https://standards.ieee.org/ieee/1800/6700/ https://sci-...
@ LK_C
Should be used for C.
@ LK_Proto
Should be used for Protocol Buffers (https://developers.google.com/protocol-buffers/).
@ Other
Other implicit parameter.
std::vector< std::string > VariableTemplates
A vector of non-keyword identifiers that should be interpreted as variable template names.
SortUsingDeclarationsOptions SortUsingDeclarations
Controls if and how clang-format will sort using declarations.
unsigned PenaltyIndentedWhitespace
Penalty for each character of whitespace indentation (counted relative to leading non-whitespace colu...
static FormatStyleSet BuildStyleSetFromConfiguration(const FormatStyle &MainStyle, const std::vector< FormatStyle > &ConfigurationStyles)
NumericLiteralCaseStyle NumericLiteralCase
Capitalization style for numeric literals.
JavaScriptQuoteStyle
Quotation styles for JavaScript strings. Does not affect template strings.
@ JSQS_Double
Always use double quotes.
@ JSQS_Leave
Leave string quotes as they are.
@ JSQS_Single
Always use single quotes.
SpaceBeforeParensStyle SpaceBeforeParens
Defines in which cases to put a space before opening parentheses.
Diagnostic wrappers for TextAPI types for error reporting.
Style for sorting and grouping C++ include directives.
IncludeBlocksStyle IncludeBlocks
Dependent on the value, multiple #include blocks can be sorted as one and divided based on category.
Options regarding which empty lines are kept.
bool AtStartOfBlock
Keep empty lines at start of a block.
bool AtStartOfFile
Keep empty lines at start of file.
bool AtEndOfFile
Keep empty lines at end of file.
bool operator==(const KeepEmptyLinesStyle &R) const
Separate control for each numeric literal component.
bool operator==(const NumericLiteralCaseStyle &R) const
bool operator!=(const NumericLiteralCaseStyle &R) const
NumericLiteralComponentStyle ExponentLetter
Format floating point exponent separator letter case.
NumericLiteralComponentStyle Suffix
Format suffix case. This option excludes case-sensitive reserved suffixes, such as min in C++.
NumericLiteralComponentStyle Prefix
Format integer prefix case.
NumericLiteralComponentStyle HexDigit
Format hexadecimal digit case.
Options related to packing arguments of function calls.
BinPackArgumentsStyle BinPack
The bin pack arguments style to use.
unsigned BreakAfter
An argument list with more arguments than the specified number will be formatted with one argument pe...
bool operator!=(const PackArgumentsStyle &R) const
bool operator==(const PackArgumentsStyle &R) const
Includes sorting options.
bool operator!=(const SortIncludesOptions &R) const
bool IgnoreCase
Whether or not includes are sorted in a case-insensitive fashion. (CaseSensitive and CaseInsensitive ...
bool IgnoreExtension
When sorting includes in each block, only take file extensions into account if two includes compare e...
bool operator==(const SortIncludesOptions &R) const
bool Enabled
If true, includes are sorted based on the other suboptions below. (Never is deprecated by Enabled: fa...
Precise control over the spacing before parentheses.
bool AfterFunctionDefinitionName
If true, put a space between function definition name and opening parentheses.
bool AfterIfMacros
If true, put space between if macros and opening parentheses.
bool AfterForeachMacros
If true, put space between foreach macros and opening parentheses.
bool AfterFunctionDeclarationName
If true, put a space between function declaration name and opening parentheses.
bool operator==(const SpaceBeforeParensCustom &Other) const
bool AfterControlStatements
If true, put space between control statement keywords (for/if/while...) and opening parentheses.
bool BeforeNonEmptyParentheses
If true, put a space before opening parentheses only if the parentheses are not empty.
bool AfterPlacementOperator
If true, put a space between operator new/delete and opening parenthesis.
bool AfterRequiresInExpression
If true, put space between requires keyword in a requires expression and opening parentheses.
bool AfterNot
If true, put a space between alternative operator not and the opening parenthesis.
bool AfterRequiresInClause
If true, put space between requires keyword in a requires clause and opening parentheses,...
SpaceBeforeParensCustom()
bool AfterOverloadedOperator
If true, put a space between operator overloading and opening parentheses.
Precise control over the spacing in parentheses.
bool Other
Put a space in parentheses not covered by preceding options.
bool InCStyleCasts
Put a space in C style casts.
bool operator!=(const SpacesInParensCustom &R) const
bool InConditionalStatements
Put a space in parentheses only inside conditional statements (for/if/while/switch....
bool InEmptyParentheses
Insert a space in empty parentheses, i.e. ().
bool ExceptDoubleParentheses
Override any of the following options to prevent addition of space when both opening and closing pare...
SpacesInParensCustom(bool ExceptDoubleParentheses, bool InConditionalStatements, bool InCStyleCasts, bool InEmptyParentheses, bool Other)
bool operator==(const SpacesInParensCustom &R) const