| /openbsd-src/gnu/llvm/clang/lib/Format/ |
| H A D | Format.cpp | 56 using clang::format::FormatStyle; 58 LLVM_YAML_IS_SEQUENCE_VECTOR(clang::format::FormatStyle::RawStringFormat) 62 template <> struct MappingTraits<FormatStyle::AlignConsecutiveStyle> { 63 static void enumInput(IO &IO, FormatStyle::AlignConsecutiveStyle &Value) { in enumInput() 65 FormatStyle::AlignConsecutiveStyle( in enumInput() 70 FormatStyle::AlignConsecutiveStyle( in enumInput() 75 FormatStyle::AlignConsecutiveStyle( in enumInput() 80 FormatStyle::AlignConsecutiveStyle({/*Enabled=*/true, in enumInput() 86 FormatStyle::AlignConsecutiveStyle({/*Enabled=*/true, in enumInput() 94 FormatStyle::AlignConsecutiveStyle( in enumInput() [all …]
|
| H A D | ContinuationIndenter.cpp | 33 static bool shouldIndentWrappedSelectorName(const FormatStyle &Style, in shouldIndentWrappedSelectorName() 124 const FormatStyle &Style) { in startsNextParameter() 127 Style.BreakConstructorInitializers == FormatStyle::BCIS_BeforeComma) { in startsNextParameter() 130 if (Style.Language == FormatStyle::LK_Proto && Current.is(TT_SelectorName)) in startsNextParameter() 135 FormatStyle::BCIS_BeforeComma) && in startsNextParameter() 137 Style.BreakInheritanceList != FormatStyle::BILS_BeforeComma)); in startsNextParameter() 141 const FormatStyle &Style) { in opensProtoMessageField() 144 return Style.Language == FormatStyle::LK_TextProto || in opensProtoMessageField() 145 (Style.Language == FormatStyle::LK_Proto && in opensProtoMessageField() 179 getCanonicalRawStringDelimiter(const FormatStyle &Style, in getCanonicalRawStringDelimiter() [all …]
|
| H A D | TokenAnnotator.cpp | 113 AnnotatingParser(const FormatStyle &Style, AnnotatedLine &Line, in AnnotatingParser() 154 if (Style.Language == FormatStyle::LK_Java && in parseAngle() 181 if (Style.Language == FormatStyle::LK_TextProto || in parseAngle() 182 (Style.Language == FormatStyle::LK_Proto && Left->Previous && in parseAngle() 192 Style.Language == FormatStyle::LK_Java) { in parseAngle() 198 !Style.isCSharp() && Style.Language != FormatStyle::LK_Proto && in parseAngle() 199 Style.Language != FormatStyle::LK_TextProto)) { in parseAngle() 215 if (Style.Language == FormatStyle::LK_Proto) { in parseAngle() 651 } else if (Style.Language == FormatStyle::LK_Proto || in parseSquare() 652 Style.Language == FormatStyle::LK_TextProto) { in parseSquare() [all …]
|
| H A D | ContinuationIndenter.h | 40 llvm::StringMap<FormatStyle> DelimiterStyle; 41 llvm::StringMap<FormatStyle> EnclosingFunctionStyle; 43 RawStringFormatStyleManager(const FormatStyle &CodeStyle); 45 std::optional<FormatStyle> getDelimiterStyle(StringRef Delimiter) const; 47 std::optional<FormatStyle> 55 ContinuationIndenter(const FormatStyle &Style, 114 const FormatStyle &RawStringStyle, 124 std::optional<FormatStyle> getRawStringStyle(const FormatToken &Current, 192 FormatStyle Style;
|
| H A D | UnwrappedLineFormatter.cpp | 45 LevelIndentTracker(const FormatStyle &Style, in LevelIndentTracker() 63 if (Style.IndentPPDirectives != FormatStyle::PPDIS_None && in nextLine() 65 (Style.IndentPPDirectives == FormatStyle::PPDIS_BeforeHash && in nextLine() 112 if (Style.Language == FormatStyle::LK_Java || Style.isJavaScript() || in getIndentOffset() 163 const FormatStyle &Style; 207 LineJoiner(const FormatStyle &Style, const AdditionalKeywords &Keywords, in LineJoiner() 308 if (Style.AllowShortFunctionsOnASingleLine == FormatStyle::SFS_All) in tryFitMultipleLinesInOne() 310 if (Style.AllowShortFunctionsOnASingleLine >= FormatStyle::SFS_Empty && in tryFitMultipleLinesInOne() 316 FormatStyle::SFS_InlineOnly) { in tryFitMultipleLinesInOne() 410 return Style.AllowShortBlocksOnASingleLine != FormatStyle::SBS_Never in tryFitMultipleLinesInOne() [all …]
|
| H A D | BreakableToken.h | 34 struct FormatStyle; 235 encoding::Encoding Encoding, const FormatStyle &Style) in BreakableToken() 242 const FormatStyle &Style; 254 encoding::Encoding Encoding, const FormatStyle &Style); 294 const FormatStyle &Style); 362 const FormatStyle &Style, bool UseCRLF); 440 const FormatStyle &Style);
|
| H A D | IntegerLiteralSeparatorFixer.cpp | 46 const FormatStyle &Style) { in process() 48 case FormatStyle::LK_Cpp: in process() 49 case FormatStyle::LK_ObjC: in process() 52 case FormatStyle::LK_CSharp: in process() 53 case FormatStyle::LK_Java: in process() 54 case FormatStyle::LK_JavaScript: in process()
|
| H A D | DefinitionBlockSeparator.cpp | 25 assert(Style.SeparateDefinitionBlocks != FormatStyle::SDS_Leave); in analyze() 36 Style.SeparateDefinitionBlocks == FormatStyle::SDS_Never; in separateBlocks() 69 (Style.SeparateDefinitionBlocks == FormatStyle::SDS_Always ? 1 : 0) + 1; in separateBlocks() 72 Style.LineEnding > FormatStyle::LE_CRLF in separateBlocks() 75 Style.LineEnding == FormatStyle::LE_DeriveCRLF) in separateBlocks() 76 : Style.LineEnding == FormatStyle::LE_CRLF); in separateBlocks()
|
| H A D | TokenAnnotator.h | 173 TokenAnnotator(const FormatStyle &Style, const AdditionalKeywords &Keywords) in TokenAnnotator() 214 FormatStyle::PointerAlignmentStyle 217 FormatStyle::PointerAlignmentStyle getTokenPointerOrReferenceAlignment( 220 const FormatStyle &Style;
|
| H A D | UnwrappedLineParser.cpp | 245 const FormatStyle &Style, unsigned &LineLevel) in CompoundStatementIndenter() 333 UnwrappedLineParser::UnwrappedLineParser(const FormatStyle &Style, in UnwrappedLineParser() 342 IncludeGuard(Style.IndentPPDirectives == FormatStyle::PPDIS_None in UnwrappedLineParser() 349 IncludeGuard = Style.IndentPPDirectives == FormatStyle::PPDIS_None in reset() 413 if (Style.Language == FormatStyle::LK_TextProto) in parseFile() 427 if (Style.Language == FormatStyle::LK_TextProto && in parseFile() 679 if (Style.Language == FormatStyle::LK_Proto) { in calculateBraceTypes() 892 Style.BreakBeforeBraces == FormatStyle::BS_Whitesmiths) { in parseBlock() 929 if (AddLevels > 0u && Style.BreakBeforeBraces != FormatStyle::BS_Whitesmiths) in parseBlock() 1069 static bool ShouldBreakBeforeBrace(const FormatStyle &Style, in ShouldBreakBeforeBrace() [all …]
|
| H A D | UnwrappedLineFormatter.h | 32 const FormatStyle &Style, in UnwrappedLineFormatter() 68 const FormatStyle &Style;
|
| H A D | WhitespaceManager.cpp | 275 AlignTokenSequence(const FormatStyle &Style, unsigned Start, unsigned End, in AlignTokenSequence() 448 if (Style.PointerAlignment == FormatStyle::PAS_Right && in AlignTokenSequence() 494 static unsigned AlignTokens(const FormatStyle &Style, F &&Matches, in AlignTokens() 497 const FormatStyle::AlignConsecutiveStyle &ACS = {}, in AlignTokens() 948 if (Style.AlignTrailingComments.Kind == FormatStyle::TCAS_Always) in alignTrailingComments() 958 if (Style.AlignTrailingComments.Kind == FormatStyle::TCAS_Leave) { in alignTrailingComments() 1013 if (Style.AlignTrailingComments.Kind == FormatStyle::TCAS_Never || in alignTrailingComments() 1064 if (Style.AlignEscapedNewlines == FormatStyle::ENAS_DontAlign) in alignEscapedNewlines() 1067 bool AlignLeft = Style.AlignEscapedNewlines == FormatStyle::ENAS_Left; in alignEscapedNewlines() 1100 if (Style.AlignArrayOfStructures == FormatStyle::AIAS_None) in alignArrayInitializers() [all …]
|
| H A D | TokenAnalyzer.h | 90 TokenAnalyzer(const Environment &Env, const FormatStyle &Style); 105 FormatStyle Style;
|
| H A D | UsingDeclarationsSorter.cpp | 88 FormatStyle::SortUsingDeclarationsOptions SortUsingDeclarations) { in compareLabels() 89 if (SortUsingDeclarations == FormatStyle::SUD_LexicographicNumeric) in compareLabels() 140 FormatStyle::SortUsingDeclarationsOptions SortUsingDeclarations) { in endUsingDeclarationBlock() 209 const FormatStyle &Style) in UsingDeclarationsSorter()
|
| H A D | FormatTokenLexer.h | 42 const FormatStyle &Style, encoding::Encoding Encoding, 117 const FormatStyle &Style;
|
| H A D | FormatToken.cpp | 78 bool FormatToken::opensBlockOrBlockTypeList(const FormatStyle &Style) const { in opensBlockOrBlockTypeList() 88 (is(tok::less) && (Style.Language == FormatStyle::LK_Proto || in opensBlockOrBlockTypeList() 89 Style.Language == FormatStyle::LK_TextProto)); in opensBlockOrBlockTypeList() 196 if (Style.AlignAfterOpenBracket == FormatStyle::BAS_DontAlign) in precomputeFormattingInfos()
|
| H A D | QualifierAlignmentFixer.h | 39 QualifierAlignmentFixer(const Environment &Env, const FormatStyle &Style, 63 const Environment &Env, const FormatStyle &Style,
|
| H A D | BreakableToken.cpp | 43 const FormatStyle &Style) { in getLineCommentIndentPrefix() 49 if (Style.Language == FormatStyle::LK_TextProto) in getLineCommentIndentPrefix() 70 encoding::Encoding Encoding, const FormatStyle &Style, in getCommentSplit() 270 encoding::Encoding Encoding, const FormatStyle &Style) in BreakableStringLiteral() 298 const FormatStyle &Style) in BreakableComment() 369 encoding::Encoding Encoding, const FormatStyle &Style, bool UseCRLF) in BreakableBlockComment() 465 if (Style.isJavaScript() || Style.Language == FormatStyle::LK_Java) { in BreakableBlockComment() 583 if (Style.Language != FormatStyle::LK_Java && !Style.isJavaScript()) in getContentIndent() 753 encoding::Encoding Encoding, const FormatStyle &Style) in BreakableLineCommentSection()
|
| H A D | Macros.h | 104 clang::SourceManager &SourceMgr, const FormatStyle &Style, 128 const FormatStyle &Style;
|
| H A D | SortJavaScriptImports.h | 27 tooling::Replacements sortJavaScriptImports(const FormatStyle &Style,
|
| H A D | FormatInternal.h | 72 reformat(const FormatStyle &Style, StringRef Code,
|
| H A D | UsingDeclarationsSorter.h | 25 UsingDeclarationsSorter(const Environment &Env, const FormatStyle &Style);
|
| /openbsd-src/gnu/llvm/clang/include/clang/Format/ |
| H A D | Format.h | 55 struct FormatStyle { struct 4174 bool operator==(const FormatStyle &R) const { argument 4328 std::optional<FormatStyle> GetLanguageStyle(LanguageKind Language) const; 4338 typedef std::map<FormatStyle::LanguageKind, FormatStyle> MapType; 4340 std::optional<FormatStyle> Get(FormatStyle::LanguageKind Language) const; 4347 void Add(FormatStyle Style); 4357 const FormatStyle &MainStyle, 4358 const std::vector<FormatStyle> &ConfigurationStyles); 4364 parseConfiguration(llvm::MemoryBufferRef Config, FormatStyle *Style, 4372 FormatStyle getLLVMStyle( [all …]
|
| /openbsd-src/gnu/llvm/clang/tools/clang-format/ |
| H A D | ClangFormat.cpp | 441 llvm::Expected<FormatStyle> FormatStyle = in format() local 444 if (!FormatStyle) { in format() 445 llvm::errs() << llvm::toString(FormatStyle.takeError()) << "\n"; in format() 451 FormatStyle->QualifierAlignment = in format() 452 StringSwitch<FormatStyle::QualifierAlignmentStyle>( in format() 454 .Case("right", FormatStyle::QAS_Right) in format() 455 .Case("left", FormatStyle::QAS_Left) in format() 456 .Default(FormatStyle->QualifierAlignment); in format() 458 if (FormatStyle->QualifierAlignment == FormatStyle::QAS_Left) { in format() 459 FormatStyle->QualifierOrder = {"const", "volatile", "type"}; in format() [all …]
|
| /openbsd-src/gnu/llvm/clang/docs/ |
| H A D | LibFormat.rst | 25 tooling::Replacements reformat(const FormatStyle &Style, Lexer &Lex, 30 ranges in ``Ranges``. The ``FormatStyle`` controls basic decisions made during 49 FormatStyle getLLVMStyle(); 53 FormatStyle getGoogleStyle(); 57 FormatStyle getChromiumStyle(); 61 FormatStyle getGNUStyle(); 65 FormatStyle getMozillaStyle(); 69 FormatStyle getWebkitStyle(); 73 FormatStyle getMicrosoftStyle();
|