Home
last modified time | relevance | path

Searched refs:FormatStyle (Results 1 – 25 of 39) sorted by relevance

12

/freebsd/contrib/llvm-project/clang/lib/Format/
H A DFormat.cpp30 using clang::format::FormatStyle;
32 LLVM_YAML_IS_SEQUENCE_VECTOR(FormatStyle::RawStringFormat)
37 struct ScalarEnumerationTraits<FormatStyle::BreakBeforeNoexceptSpecifierStyle> {
39 enumeration(IO &IO, FormatStyle::BreakBeforeNoexceptSpecifierStyle &Value) { in enumeration()
40 IO.enumCase(Value, "Never", FormatStyle::BBNSS_Never); in enumeration()
41 IO.enumCase(Value, "OnlyWithParen", FormatStyle::BBNSS_OnlyWithParen); in enumeration()
42 IO.enumCase(Value, "Always", FormatStyle::BBNSS_Always); in enumeration()
46 template <> struct MappingTraits<FormatStyle::AlignConsecutiveStyle> {
47 static void enumInput(IO &IO, FormatStyle::AlignConsecutiveStyle &Value) { in enumInput()
48 IO.enumCase(Value, "None", FormatStyle::AlignConsecutiveStyle({})); in enumInput()
[all …]
H A DContinuationIndenter.cpp34 static bool shouldIndentWrappedSelectorName(const FormatStyle &Style, in shouldIndentWrappedSelectorName()
149 const FormatStyle &Style) { in mustBreakBinaryOperation()
150 return Style.BreakBinaryOperations != FormatStyle::BBO_Never && in mustBreakBinaryOperation()
152 (Style.BreakBeforeBinaryOperators == FormatStyle::BOS_None in mustBreakBinaryOperation()
158 const FormatStyle &Style) { in opensProtoMessageField()
162 (Style.Language == FormatStyle::LK_Proto && in opensProtoMessageField()
196 getCanonicalRawStringDelimiter(const FormatStyle &Style, in getCanonicalRawStringDelimiter()
197 FormatStyle::LanguageKind Language) { in getCanonicalRawStringDelimiter()
205 const FormatStyle &CodeStyle) { in RawStringFormatStyleManager()
207 std::optional<FormatStyle> LanguageStyle = in RawStringFormatStyleManager()
[all …]
H A DContinuationIndenter.h35 llvm::StringMap<FormatStyle> DelimiterStyle;
36 llvm::StringMap<FormatStyle> EnclosingFunctionStyle;
38 RawStringFormatStyleManager(const FormatStyle &CodeStyle);
40 std::optional<FormatStyle> getDelimiterStyle(StringRef Delimiter) const;
42 std::optional<FormatStyle>
50 ContinuationIndenter(const FormatStyle &Style,
109 const FormatStyle &RawStringStyle,
119 std::optional<FormatStyle> getRawStringStyle(const FormatToken &Current,
187 FormatStyle Style;
H A DUnwrappedLineFormatter.cpp46 LevelIndentTracker(const FormatStyle &Style, in LevelIndentTracker()
65 if (Style.IndentPPDirectives != FormatStyle::PPDIS_None && in nextLine()
67 (Style.IndentPPDirectives == FormatStyle::PPDIS_BeforeHash && in nextLine()
146 const FormatStyle &Style;
193 LineJoiner(const FormatStyle &Style, const AdditionalKeywords &Keywords, in LineJoiner()
293 if (Style.AllowShortFunctionsOnASingleLine == FormatStyle::SFS_All) in tryFitMultipleLinesInOne()
295 if (Style.AllowShortFunctionsOnASingleLine >= FormatStyle::SFS_Empty && in tryFitMultipleLinesInOne()
301 FormatStyle::SFS_InlineOnly) { in tryFitMultipleLinesInOne()
321 (Style.BreakBeforeBraces == FormatStyle::BS_Whitesmiths && in tryFitMultipleLinesInOne()
421 return Style.AllowShortBlocksOnASingleLine != FormatStyle::SBS_Never in tryFitMultipleLinesInOne()
[all …]
H A DBreakableToken.h31 struct FormatStyle;
237 encoding::Encoding Encoding, const FormatStyle &Style) in BreakableToken()
244 const FormatStyle &Style;
256 encoding::Encoding Encoding, const FormatStyle &Style);
304 encoding::Encoding Encoding, const FormatStyle &Style);
335 const FormatStyle &Style);
387 const bool AlwaysReflow = Style.ReflowComments == FormatStyle::RCS_Always;
405 const FormatStyle &Style, bool UseCRLF);
483 const FormatStyle &Style);
H A DIntegerLiteralSeparatorFixer.cpp46 const FormatStyle &Style) { in process()
48 case FormatStyle::LK_CSharp: in process()
49 case FormatStyle::LK_Java: in process()
50 case FormatStyle::LK_JavaScript: in process()
53 case FormatStyle::LK_Cpp: in process()
54 case FormatStyle::LK_ObjC: in process()
55 if (Style.Standard >= FormatStyle::LS_Cpp14) { in process()
H A DFormatToken.cpp54 bool FormatToken::isBlockIndentedInitRBrace(const FormatStyle &Style) const { in isBlockIndentedInitRBrace()
59 Style.AlignAfterOpenBracket != FormatStyle::BAS_BlockIndent) { in isBlockIndentedInitRBrace()
70 bool FormatToken::opensBlockOrBlockTypeList(const FormatStyle &Style) const { in opensBlockOrBlockTypeList()
187 if (Style.AlignAfterOpenBracket == FormatStyle::BAS_DontAlign) in precomputeFormattingInfos()
324 bool startsNextParameter(const FormatToken &Current, const FormatStyle &Style) { in startsNextParameter()
328 Style.BreakConstructorInitializers == FormatStyle::BCIS_BeforeComma) { in startsNextParameter()
331 if (Style.Language == FormatStyle::LK_Proto && Current.is(TT_SelectorName)) in startsNextParameter()
336 FormatStyle::BCIS_BeforeComma) && in startsNextParameter()
338 Style.BreakInheritanceList != FormatStyle::BILS_BeforeComma)); in startsNextParameter()
H A DTokenAnnotator.cpp27 const FormatStyle &Style) { in mustBreakAfterAttributes()
29 case FormatStyle::ABS_Always: in mustBreakAfterAttributes()
31 case FormatStyle::ABS_Leave: in mustBreakAfterAttributes()
125 AnnotatingParser(const FormatStyle &Style, AnnotatedLine &Line, in AnnotatingParser()
220 (Style.Language == FormatStyle::LK_Proto && BeforeLess && in parseAngle()
257 if (Style.Language == FormatStyle::LK_Proto) { in parseAngle()
1022 if (Style.TableGenBreakInsideDAGArg != FormatStyle::DAS_DontBreak) { in parseTableGenDAGArgAndList()
1035 if (Style.TableGenBreakInsideDAGArg == FormatStyle::DAS_BreakAll) in parseTableGenDAGArgAndList()
1193 if (Style.AlignArrayOfStructures != FormatStyle::AIAS_None) { in parseBrace()
1587 (Style.Language == FormatStyle::LK_Proto && Prev && in consumeToken()
[all …]
H A DDefinitionBlockSeparator.cpp24 assert(Style.SeparateDefinitionBlocks != FormatStyle::SDS_Leave); in analyze()
35 Style.SeparateDefinitionBlocks == FormatStyle::SDS_Never; in separateBlocks()
68 (Style.SeparateDefinitionBlocks == FormatStyle::SDS_Always ? 1 : 0) + 1; in separateBlocks()
71 Style.LineEnding > FormatStyle::LE_CRLF in separateBlocks()
74 Style.LineEnding == FormatStyle::LE_DeriveCRLF) in separateBlocks()
75 : Style.LineEnding == FormatStyle::LE_CRLF); in separateBlocks()
H A DWhitespaceManager.cpp287 AlignTokenSequence(const FormatStyle &Style, unsigned Start, unsigned End, in AlignTokenSequence()
470 if ((Style.PointerAlignment == FormatStyle::PAS_Right || in AlignTokenSequence()
471 Style.ReferenceAlignment == FormatStyle::RAS_Right) && in AlignTokenSequence()
476 Style.ReferenceAlignment != FormatStyle::RAS_Right && in AlignTokenSequence()
477 Style.ReferenceAlignment != FormatStyle::RAS_Pointer; in AlignTokenSequence()
485 } else if (Style.PointerAlignment != FormatStyle::PAS_Right) { in AlignTokenSequence()
528 static unsigned AlignTokens(const FormatStyle &Style, F &&Matches, in AlignTokens()
531 const FormatStyle::AlignConsecutiveStyle &ACS = {}, in AlignTokens()
864 const FormatStyle::AlignConsecutiveStyle &AlignStyle, TokenType Type) { in alignConsecutiveColons()
1085 if (Style.AlignTrailingComments.Kind == FormatStyle::TCAS_Never) in alignTrailingComments()
[all …]
H A DTokenAnnotator.h225 TokenAnnotator(const FormatStyle &Style, const AdditionalKeywords &Keywords) in TokenAnnotator()
267 FormatStyle::PointerAlignmentStyle
270 FormatStyle::PointerAlignmentStyle getTokenPointerOrReferenceAlignment(
273 const FormatStyle &Style;
H A DUnwrappedLineFormatter.h30 const FormatStyle &Style, in UnwrappedLineFormatter()
66 const FormatStyle &Style;
H A DUsingDeclarationsSorter.cpp88 FormatStyle::SortUsingDeclarationsOptions SortUsingDeclarations) { in compareLabels()
89 if (SortUsingDeclarations == FormatStyle::SUD_LexicographicNumeric) in compareLabels()
140 FormatStyle::SortUsingDeclarationsOptions SortUsingDeclarations) { in endUsingDeclarationBlock()
208 const FormatStyle &Style) in UsingDeclarationsSorter()
H A DTokenAnalyzer.h79 TokenAnalyzer(const Environment &Env, const FormatStyle &Style);
94 FormatStyle Style;
H A DQualifierAlignmentFixer.h27 void addQualifierAlignmentFixerPasses(const FormatStyle &Style,
52 const Environment &Env, const FormatStyle &Style,
H A DFormatTokenLexer.h38 const FormatStyle &Style, encoding::Encoding Encoding,
124 const FormatStyle &Style;
H A DWhitespaceManager.h37 WhitespaceManager(const SourceManager &SourceMgr, const FormatStyle &Style, in WhitespaceManager()
226 alignConsecutiveColons(const FormatStyle::AlignConsecutiveStyle &AlignStyle,
365 const FormatStyle &Style;
H A DUnwrappedLineParser.cpp134 const FormatStyle &Style, unsigned &LineLevel) in CompoundStatementIndenter()
137 FormatStyle::BWACS_Always, in CompoundStatementIndenter()
155 SourceManager &SourceMgr, const FormatStyle &Style, in UnwrappedLineParser()
165 IncludeGuard(Style.IndentPPDirectives == FormatStyle::PPDIS_None in UnwrappedLineParser()
173 IncludeGuard = Style.IndentPPDirectives == FormatStyle::PPDIS_None in reset()
444 if (Style.Language == FormatStyle::LK_Proto || Style.isVerilog() || in parseLevel()
544 if (Style.Language == FormatStyle::LK_Proto) { in calculateBraceTypes()
772 Style.BreakBeforeBraces == FormatStyle::BS_Whitesmiths) { in parseBlock()
809 if (AddLevels > 0u && Style.BreakBeforeBraces != FormatStyle::BS_Whitesmiths) in parseBlock()
954 static bool ShouldBreakBeforeBrace(const FormatStyle &Style, in ShouldBreakBeforeBrace()
[all …]
H A DMacros.h98 SourceManager &SourceMgr, const FormatStyle &Style,
128 const FormatStyle &Style;
H A DBreakableToken.cpp31 const FormatStyle &Style) { in getLineCommentIndentPrefix()
58 encoding::Encoding Encoding, const FormatStyle &Style, in getCommentSplit()
257 encoding::Encoding Encoding, const FormatStyle &Style) in BreakableStringLiteral()
285 encoding::Encoding Encoding, const FormatStyle &Style) in BreakableStringLiteralUsingOperators()
303 Style.BreakBeforeBinaryOperators != FormatStyle::BOS_None; in BreakableStringLiteralUsingOperators()
339 Style.AlignOperands == FormatStyle::OAS_AlignAfterOperator) { in BreakableStringLiteralUsingOperators()
399 const FormatStyle &Style) in BreakableComment()
470 encoding::Encoding Encoding, const FormatStyle &Style, bool UseCRLF) in BreakableBlockComment()
853 encoding::Encoding Encoding, const FormatStyle &Style) in BreakableLineCommentSection()
H A DSortJavaScriptImports.h24 tooling::Replacements sortJavaScriptImports(const FormatStyle &Style,
H A DFormatInternal.h74 reformat(const FormatStyle &Style, StringRef Code,
H A DUsingDeclarationsSorter.h25 UsingDeclarationsSorter(const Environment &Env, const FormatStyle &Style);
/freebsd/contrib/llvm-project/clang/include/clang/Format/
H A DFormat.h55 struct FormatStyle { struct
5317 bool operator==(const FormatStyle &R) const { argument
5513 std::optional<FormatStyle> GetLanguageStyle(LanguageKind Language) const;
5523 typedef std::map<LanguageKind, FormatStyle> MapType;
5525 std::optional<FormatStyle> Get(LanguageKind Language) const;
5532 void Add(FormatStyle Style);
5542 const FormatStyle &MainStyle,
5543 const std::vector<FormatStyle> &ConfigurationStyles);
5549 parseConfiguration(llvm::MemoryBufferRef Config, FormatStyle *Style,
5557 FormatStyle
[all …]
/freebsd/contrib/llvm-project/clang/tools/clang-format/
H A DClangFormat.cpp447 Expected<FormatStyle> FormatStyle = in format() local
450 if (!FormatStyle) { in format()
451 llvm::errs() << toString(FormatStyle.takeError()) << "\n"; in format()
457 FormatStyle->QualifierAlignment = in format()
458 StringSwitch<FormatStyle::QualifierAlignmentStyle>( in format()
460 .Case("right", FormatStyle::QAS_Right) in format()
461 .Case("left", FormatStyle::QAS_Left) in format()
462 .Default(FormatStyle->QualifierAlignment); in format()
464 if (FormatStyle->QualifierAlignment == FormatStyle::QAS_Left) { in format()
465 FormatStyle->QualifierOrder = {"const", "volatile", "type"}; in format()
[all …]

12