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;
6430 const std::vector<FormatStyle> &ConfigurationStyles);
6433 FormatStyleSet StyleSet;
6435 friend std::error_code
6437 bool AllowUnknownOptions,
6438 llvm::SourceMgr::DiagHandlerTy DiagHandler,
6439 void *DiagHandlerCtxt,
bool IsDotHFile);
6503 bool AllowUnknownOptions =
false,
6504 llvm::SourceMgr::DiagHandlerTy DiagHandler =
nullptr,
6505 void *DiagHandlerCtx =
nullptr,
bool IsDotHFile =
false);
6509 bool AllowUnknownOptions =
false,
6510 bool IsDotHFile =
false) {
6512 AllowUnknownOptions,
nullptr,
6513 nullptr, IsDotHFile);
6524 unsigned *Cursor =
nullptr);
6583 StringRef
FileName,
bool *IncompleteFormat);
6672 StringRef Code =
"", llvm::vfs::FileSystem *FS =
nullptr,
6673 bool AllowUnknownOptions =
false,
6674 llvm::SourceMgr::DiagHandlerTy DiagHandler =
nullptr);
6690 return "Objective-C";
6694 return "JavaScript";
6717struct 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.
__builtin_bitreverse32 uint32_t __builtin_riscv_aaddu_u32 __builtin_riscv_asubu_u32 __builtin_elementwise_add_sat __builtin_elementwise_sub_sat int32_t uint32_t uint32_t __builtin_riscv_mhacc_i32 __builtin_riscv_mhaccu_u32 __builtin_riscv_mhaccsu_i32 __builtin_riscv_mulq_i32 __builtin_riscv_mqwacc_i64 __packed_splat4 __packed_splat2 __packed_splat8 __packed_splat4 __packed_splat2 int8_t