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"
24#include "llvm/Support/VirtualFileSystemFwd.h"
26#include <system_error>
43 const char *
name()
const noexcept override;
44 std::string
message(
int EV)
const override;
268 return !(*
this == R);
624 return !(*
this == R);
2600 return !(*
this == R);
2627 if (llvm::find(Rule.Operators, Kind) != Rule.Operators.end())
2632 if (Kind == tok::greater &&
2633 llvm::find(Rule.Operators, tok::greatergreater) !=
2634 Rule.Operators.end()) {
2647 return Rule->MinChainLength;
2654 return !(*
this == R);
3675 return Binary == R.Binary &&
4012 std::vector<std::string>
Macros;
4143 return !(*
this == R);
5189 return !(*
this == R);
5565 Other.AfterFunctionDeclarationName &&
5892 return !(*
this == R);
6190 R.AlignConsecutiveShortCaseStatements &&
6192 R.AlignConsecutiveTableGenBreakingDAGArgColons &&
6194 R.AlignConsecutiveTableGenCondOperatorColons &&
6196 R.AlignConsecutiveTableGenDefinitionColons &&
6202 R.AllowAllParametersOfDeclarationOnNextLine &&
6204 R.AllowBreakBeforeNoexceptSpecifier &&
6208 R.AllowShortCaseExpressionOnASingleLine &&
6210 R.AllowShortCaseLabelsOnASingleLine &&
6212 R.AllowShortCompoundRequirementOnASingleLine &&
6215 R.AllowShortFunctionsOnASingleLine &&
6217 R.AllowShortIfStatementsOnASingleLine &&
6221 R.AllowShortNamespacesOnASingleLine &&
6224 R.AlwaysBreakBeforeMultilineStrings &&
6233 R.BreakAfterOpenBracketBracedList &&
6243 R.BreakBeforeCloseBracketBracedList &&
6245 R.BreakBeforeCloseBracketFunction &&
6257 R.BreakFunctionDeclarationParameters &&
6259 R.BreakFunctionDefinitionParameters &&
6267 R.ConstructorInitializerIndentWidth &&
6276 R.ExperimentalAutoDetectBinPacking &&
6279 IncludeStyle.IncludeBlocks == R.IncludeStyle.IncludeBlocks &&
6280 IncludeStyle.IncludeCategories == R.IncludeStyle.IncludeCategories &&
6282 R.IncludeStyle.IncludeIsMainRegex &&
6284 R.IncludeStyle.IncludeIsMainSourceRegex &&
6285 IncludeStyle.MainIncludeChar == R.IncludeStyle.MainIncludeChar &&
6308 R.MacrosSkippedByRemoveParentheses &&
6316 R.ObjCBreakBeforeNestedBlockParam &&
6319 R.ObjCSpaceAfterMethodDeclarationPrefix &&
6328 R.PenaltyBreakBeforeFirstCallParameter &&
6336 R.PenaltyBreakTemplateDeclaration &&
6346 R.RemoveEmptyLinesInUnwrappedLines &&
6364 R.SpaceBeforeCtorInitializerColon &&
6371 R.SpaceBeforeRangeBasedForLoopColon &&
6376 SpacesInBlockComments == R.SpacesInBlockComments &&
6379 R.SpacesInLineCommentPrefix.Minimum &&
6381 R.SpacesInLineCommentPrefix.Maximum &&
6389 R.TableGenBreakingDAGArgOperators &&
6395 R.VerilogBreakBetweenInstancePorts &&
6410 typedef std::map<LanguageKind, FormatStyle>
MapType;
6425 std::shared_ptr<MapType> Styles;
6431 friend std::error_code
6433 bool AllowUnknownOptions,
6434 llvm::SourceMgr::DiagHandlerTy DiagHandler,
6435 void *DiagHandlerCtxt,
bool IsDotHFile);
6499 bool AllowUnknownOptions =
false,
6500 llvm::SourceMgr::DiagHandlerTy DiagHandler =
nullptr,
6501 void *DiagHandlerCtx =
nullptr,
bool IsDotHFile =
false);
6505 bool AllowUnknownOptions =
false,
6506 bool IsDotHFile =
false) {
6508 AllowUnknownOptions,
nullptr,
6509 nullptr, IsDotHFile);
6520 unsigned *Cursor =
nullptr);
6579 StringRef
FileName,
bool *IncompleteFormat);
6657 StringRef Code =
"", llvm::vfs::FileSystem *FS =
nullptr,
6658 bool AllowUnknownOptions =
false,
6659 llvm::SourceMgr::DiagHandlerTy DiagHandler =
nullptr);
6675 return "Objective-C";
6679 return "JavaScript";
6702struct std::is_error_code_enum<
clang::format::ParseError> : std::true_type {};
Defines the clang::LangOptions interface.
Defines the clang::TokenKind enum and support functions.
Keeps track of the various options that can be enabled, which controls the dialect of C or C++ that i...
TokenKind
Provides a simple uniform namespace for tokens from all C languages.
Top level wrappers for InstallAPI frontend operations.
Language
The language for the input, used to select and validate the language standard and possible actions.
int32_t uint32_t uint32_t __builtin_riscv_mhracc_i32 __builtin_riscv_mhraccu_u32 __builtin_riscv_mhraccsu_i32 __builtin_riscv_mulqr_i32 __builtin_riscv_mqrwacc_i64 int8_t