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);
3677 return Binary == R.Binary &&
4014 std::vector<std::string>
Macros;
4155 return !(*
this == R);
5201 return !(*
this == R);
5577 Other.AfterFunctionDeclarationName &&
5904 return !(*
this == R);
6202 R.AlignConsecutiveShortCaseStatements &&
6204 R.AlignConsecutiveTableGenBreakingDAGArgColons &&
6206 R.AlignConsecutiveTableGenCondOperatorColons &&
6208 R.AlignConsecutiveTableGenDefinitionColons &&
6214 R.AllowAllParametersOfDeclarationOnNextLine &&
6216 R.AllowBreakBeforeNoexceptSpecifier &&
6220 R.AllowShortCaseExpressionOnASingleLine &&
6222 R.AllowShortCaseLabelsOnASingleLine &&
6224 R.AllowShortCompoundRequirementOnASingleLine &&
6227 R.AllowShortFunctionsOnASingleLine &&
6229 R.AllowShortIfStatementsOnASingleLine &&
6233 R.AllowShortNamespacesOnASingleLine &&
6236 R.AlwaysBreakBeforeMultilineStrings &&
6245 R.BreakAfterOpenBracketBracedList &&
6255 R.BreakBeforeCloseBracketBracedList &&
6257 R.BreakBeforeCloseBracketFunction &&
6269 R.BreakFunctionDeclarationParameters &&
6271 R.BreakFunctionDefinitionParameters &&
6279 R.ConstructorInitializerIndentWidth &&
6288 R.ExperimentalAutoDetectBinPacking &&
6291 IncludeStyle.IncludeBlocks == R.IncludeStyle.IncludeBlocks &&
6292 IncludeStyle.IncludeCategories == R.IncludeStyle.IncludeCategories &&
6294 R.IncludeStyle.IncludeIsMainRegex &&
6296 R.IncludeStyle.IncludeIsMainSourceRegex &&
6297 IncludeStyle.MainIncludeChar == R.IncludeStyle.MainIncludeChar &&
6320 R.MacrosSkippedByRemoveParentheses &&
6328 R.ObjCBreakBeforeNestedBlockParam &&
6331 R.ObjCSpaceAfterMethodDeclarationPrefix &&
6340 R.PenaltyBreakBeforeFirstCallParameter &&
6348 R.PenaltyBreakTemplateDeclaration &&
6358 R.RemoveEmptyLinesInUnwrappedLines &&
6376 R.SpaceBeforeCtorInitializerColon &&
6383 R.SpaceBeforeRangeBasedForLoopColon &&
6388 SpacesInBlockComments == R.SpacesInBlockComments &&
6391 R.SpacesInLineCommentPrefix.Minimum &&
6393 R.SpacesInLineCommentPrefix.Maximum &&
6401 R.TableGenBreakingDAGArgOperators &&
6407 R.VerilogBreakBetweenInstancePorts &&
6422 typedef std::map<LanguageKind, FormatStyle>
MapType;
6437 std::shared_ptr<MapType> Styles;
6443 friend std::error_code
6445 bool AllowUnknownOptions,
6446 llvm::SourceMgr::DiagHandlerTy DiagHandler,
6447 void *DiagHandlerCtxt,
bool IsDotHFile);
6511 bool AllowUnknownOptions =
false,
6512 llvm::SourceMgr::DiagHandlerTy DiagHandler =
nullptr,
6513 void *DiagHandlerCtx =
nullptr,
bool IsDotHFile =
false);
6517 bool AllowUnknownOptions =
false,
6518 bool IsDotHFile =
false) {
6520 AllowUnknownOptions,
nullptr,
6521 nullptr, IsDotHFile);
6532 unsigned *Cursor =
nullptr);
6591 StringRef
FileName,
bool *IncompleteFormat);
6669 StringRef Code =
"", llvm::vfs::FileSystem *FS =
nullptr,
6670 bool AllowUnknownOptions =
false,
6671 llvm::SourceMgr::DiagHandlerTy DiagHandler =
nullptr);
6687 return "Objective-C";
6691 return "JavaScript";
6714struct 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_mhacc_h1_i32 __builtin_riscv_mhaccsu_h1_i32 __builtin_riscv_mulqr_i32 __builtin_riscv_mqrwacc_i64 int8_t