Home
last modified time | relevance | path

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

12

/freebsd/contrib/llvm-project/clang/lib/Format/
H A DFormat.cpp29 using clang::format::FormatStyle;
31 LLVM_YAML_IS_SEQUENCE_VECTOR(FormatStyle::RawStringFormat)
36 struct ScalarEnumerationTraits<FormatStyle::BreakBeforeNoexceptSpecifierStyle> {
38 enumeration(IO &IO, FormatStyle::BreakBeforeNoexceptSpecifierStyle &Value) { in enumeration()
39 IO.enumCase(Value, "Never", FormatStyle::BBNSS_Never); in enumeration()
40 IO.enumCase(Value, "OnlyWithParen", FormatStyle::BBNSS_OnlyWithParen); in enumeration()
41 IO.enumCase(Value, "Always", FormatStyle::BBNSS_Always); in enumeration()
45 template <> struct MappingTraits<FormatStyle::AlignConsecutiveStyle> {
46 static void enumInput(IO &IO, FormatStyle::AlignConsecutiveStyle &Value) { in enumInput()
48 FormatStyle::AlignConsecutiveStyle( in enumInput()
[all …]
H A DContinuationIndenter.cpp34 static bool shouldIndentWrappedSelectorName(const FormatStyle &Style, in shouldIndentWrappedSelectorName()
133 const FormatStyle &Style) { in startsNextParameter()
136 Style.BreakConstructorInitializers == FormatStyle::BCIS_BeforeComma) { in startsNextParameter()
139 if (Style.Language == FormatStyle::LK_Proto && Current.is(TT_SelectorName)) in startsNextParameter()
144 FormatStyle::BCIS_BeforeComma) && in startsNextParameter()
146 Style.BreakInheritanceList != FormatStyle::BILS_BeforeComma)); in startsNextParameter()
150 const FormatStyle &Style) { in opensProtoMessageField()
153 return Style.Language == FormatStyle::LK_TextProto || in opensProtoMessageField()
154 (Style.Language == FormatStyle::LK_Proto && in opensProtoMessageField()
188 getCanonicalRawStringDelimiter(const FormatStyle &Style, in getCanonicalRawStringDelimiter()
[all …]
H A DTokenAnnotator.cpp28 const FormatStyle &Style) { in mustBreakAfterAttributes()
30 case FormatStyle::ABS_Always: in mustBreakAfterAttributes()
32 case FormatStyle::ABS_Leave: in mustBreakAfterAttributes()
125 AnnotatingParser(const FormatStyle &Style, AnnotatedLine &Line, in AnnotatingParser()
187 if (Style.Language == FormatStyle::LK_Java && in parseAngle()
223 if (Style.Language == FormatStyle::LK_TextProto || in parseAngle()
224 (Style.Language == FormatStyle::LK_Proto && BeforeLess && in parseAngle()
237 Style.Language == FormatStyle::LK_Java) { in parseAngle()
259 if (Style.Language == FormatStyle::LK_Proto) { in parseAngle()
1030 if (Style.TableGenBreakInsideDAGArg != FormatStyle::DAS_DontBreak) { in parseTableGenDAGArgAndList()
[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()
115 if (Style.Language == FormatStyle::LK_Java || Style.isJavaScript() || in getIndentOffset()
166 const FormatStyle &Style;
213 LineJoiner(const FormatStyle &Style, const AdditionalKeywords &Keywords, in LineJoiner()
314 if (Style.AllowShortFunctionsOnASingleLine == FormatStyle::SFS_All) in tryFitMultipleLinesInOne()
316 if (Style.AllowShortFunctionsOnASingleLine >= FormatStyle::SFS_Empty && in tryFitMultipleLinesInOne()
322 FormatStyle::SFS_InlineOnly) { in tryFitMultipleLinesInOne()
427 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);
403 const FormatStyle &Style, bool UseCRLF);
481 const FormatStyle &Style);
H A DIntegerLiteralSeparatorFixer.cpp46 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 DUnwrappedLineParser.cpp138 const FormatStyle &Style, unsigned &LineLevel) in CompoundStatementIndenter()
158 SourceManager &SourceMgr, const FormatStyle &Style, in UnwrappedLineParser()
168 IncludeGuard(Style.IndentPPDirectives == FormatStyle::PPDIS_None in UnwrappedLineParser()
178 IncludeGuard = Style.IndentPPDirectives == FormatStyle::PPDIS_None in reset()
277 if (Style.Language == FormatStyle::LK_TextProto) in parseFile()
291 if (Style.Language == FormatStyle::LK_TextProto && in parseFile()
450 if (Style.Language == FormatStyle::LK_Proto || Style.isVerilog() || in parseLevel()
550 if (Style.Language == FormatStyle::LK_Proto) { in calculateBraceTypes()
777 Style.BreakBeforeBraces == FormatStyle::BS_Whitesmiths) { in parseBlock()
814 if (AddLevels > 0u && Style.BreakBeforeBraces != FormatStyle in parseBlock()
[all...]
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()
1090 if (Style.AlignTrailingComments.Kind == FormatStyle::TCAS_Never) in alignTrailingComments()
[all …]
H A DTokenAnnotator.h215 TokenAnnotator(const FormatStyle &Style, const AdditionalKeywords &Keywords) in TokenAnnotator()
259 FormatStyle::PointerAlignmentStyle
262 FormatStyle::PointerAlignmentStyle getTokenPointerOrReferenceAlignment(
265 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()
209 const FormatStyle &Style) in UsingDeclarationsSorter()
H A DTokenAnalyzer.h79 TokenAnalyzer(const Environment &Env, const FormatStyle &Style);
94 FormatStyle Style;
H A DBreakableToken.cpp43 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 encoding::Encoding Encoding, const FormatStyle &Style) in BreakableStringLiteralUsingOperators()
316 Style.BreakBeforeBinaryOperators != FormatStyle::BOS_None; in BreakableStringLiteralUsingOperators()
352 Style.AlignOperands == FormatStyle::OAS_AlignAfterOperator) { in BreakableStringLiteralUsingOperators()
412 const FormatStyle &Style) in BreakableComment()
483 encoding::Encoding Encoding, const FormatStyle &Style, bool UseCRLF) in BreakableBlockComment()
579 if (Style.isJavaScript() || Style.Language == FormatStyle::LK_Java) { in BreakableBlockComment()
[all …]
H A DFormatToken.cpp56 bool FormatToken::isBlockIndentedInitRBrace(const FormatStyle &Style) const { in isBlockIndentedInitRBrace()
59 Style.AlignAfterOpenBracket != FormatStyle::BAS_BlockIndent) { in isBlockIndentedInitRBrace()
71 bool FormatToken::opensBlockOrBlockTypeList(const FormatStyle &Style) const { in opensBlockOrBlockTypeList()
188 if (Style.AlignAfterOpenBracket == FormatStyle::BAS_DontAlign) in precomputeFormattingInfos()
H A DFormatTokenLexer.h38 const FormatStyle &Style, encoding::Encoding Encoding,
121 const FormatStyle &Style;
H A DQualifierAlignmentFixer.h27 void addQualifierAlignmentFixerPasses(const FormatStyle &Style,
52 const Environment &Env, 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 DMacros.h98 SourceManager &SourceMgr, const FormatStyle &Style,
128 const FormatStyle &Style;
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);
H A DIntegerLiteralSeparatorFixer.h26 const FormatStyle &Style);
/freebsd/contrib/llvm-project/clang/include/clang/Format/
H A DFormat.h55 struct FormatStyle { struct
4985 bool operator==(const FormatStyle &R) const { argument
5164 std::optional<FormatStyle> GetLanguageStyle(LanguageKind Language) const;
5174 typedef std::map<FormatStyle::LanguageKind, FormatStyle> MapType;
5176 std::optional<FormatStyle> Get(FormatStyle::LanguageKind Language) const;
5183 void Add(FormatStyle Style);
5193 const FormatStyle &MainStyle,
5194 const std::vector<FormatStyle> &ConfigurationStyles);
5200 parseConfiguration(llvm::MemoryBufferRef Config, FormatStyle *Style,
5208 FormatStyle getLLVMStyle(
[all …]
/freebsd/contrib/llvm-project/clang/tools/clang-format/
H A DClangFormat.cpp454 Expected<FormatStyle> FormatStyle = in format() local
457 if (!FormatStyle) { in format()
458 llvm::errs() << toString(FormatStyle.takeError()) << "\n"; in format()
464 FormatStyle->QualifierAlignment = in format()
465 StringSwitch<FormatStyle::QualifierAlignmentStyle>( in format()
467 .Case("right", FormatStyle::QAS_Right) in format()
468 .Case("left", FormatStyle::QAS_Left) in format()
469 .Default(FormatStyle->QualifierAlignment); in format()
471 if (FormatStyle->QualifierAlignment == FormatStyle::QAS_Left) { in format()
472 FormatStyle->QualifierOrder = {"const", "volatile", "type"}; in format()
[all …]

12