Home
last modified time | relevance | path

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

12

/netbsd-src/external/apache2/llvm/dist/clang/lib/Format/
H A DFormat.cpp50 using clang::format::FormatStyle;
52 LLVM_YAML_IS_SEQUENCE_VECTOR(clang::format::FormatStyle::RawStringFormat)
56 template <> struct ScalarEnumerationTraits<FormatStyle::LanguageKind> {
57 static void enumeration(IO &IO, FormatStyle::LanguageKind &Value) { in enumeration()
58 IO.enumCase(Value, "Cpp", FormatStyle::LK_Cpp); in enumeration()
59 IO.enumCase(Value, "Java", FormatStyle::LK_Java); in enumeration()
60 IO.enumCase(Value, "JavaScript", FormatStyle::LK_JavaScript); in enumeration()
61 IO.enumCase(Value, "ObjC", FormatStyle::LK_ObjC); in enumeration()
62 IO.enumCase(Value, "Proto", FormatStyle::LK_Proto); in enumeration()
63 IO.enumCase(Value, "TableGen", FormatStyle::LK_TableGen); in enumeration()
[all …]
H A DTokenAnnotator.cpp73 AnnotatingParser(const FormatStyle &Style, AnnotatedLine &Line, in AnnotatingParser()
112 if (Style.Language == FormatStyle::LK_Java && in parseAngle()
138 if (Style.Language == FormatStyle::LK_TextProto || in parseAngle()
139 (Style.Language == FormatStyle::LK_Proto && Left->Previous && in parseAngle()
148 Style.Language == FormatStyle::LK_Java) { in parseAngle()
154 !Style.isCSharp() && Style.Language != FormatStyle::LK_Proto && in parseAngle()
155 Style.Language != FormatStyle::LK_TextProto)) in parseAngle()
169 if (Style.Language == FormatStyle::LK_Proto) { in parseAngle()
233 } else if (Style.Language == FormatStyle::LK_JavaScript && in parseParens()
247 } else if (Style.Language == FormatStyle::LK_JavaScript && Left->Previous && in parseParens()
[all …]
H A DUnwrappedLineParser.cpp175 const FormatStyle &Style, unsigned &LineLevel) in CompoundStatementIndenter()
225 UnwrappedLineParser::UnwrappedLineParser(const FormatStyle &Style, in UnwrappedLineParser()
234 IncludeGuard(Style.IndentPPDirectives == FormatStyle::PPDIS_None in UnwrappedLineParser()
241 IncludeGuard = Style.IndentPPDirectives == FormatStyle::PPDIS_None in reset()
303 !Line->InPPDirective && Style.Language != FormatStyle::LK_JavaScript; in parseFile()
306 if (Style.Language == FormatStyle::LK_TextProto) in parseFile()
320 if (Style.Language == FormatStyle::LK_TextProto && in parseFile()
414 if (Style.Language == FormatStyle::LK_JavaScript && in parseLevel()
464 if (Style.Language == FormatStyle::LK_JavaScript && PrevTok) { in calculateBraceTypes()
489 if (Style.Language == FormatStyle::LK_Proto) { in calculateBraceTypes()
[all …]
H A DContinuationIndenter.cpp30 static bool shouldIndentWrappedSelectorName(const FormatStyle &Style, in shouldIndentWrappedSelectorName()
121 const FormatStyle &Style) { in startsNextParameter()
124 Style.BreakConstructorInitializers == FormatStyle::BCIS_BeforeComma) in startsNextParameter()
126 if (Style.Language == FormatStyle::LK_Proto && Current.is(TT_SelectorName)) in startsNextParameter()
131 FormatStyle::BCIS_BeforeComma) && in startsNextParameter()
133 Style.BreakInheritanceList != FormatStyle::BILS_BeforeComma)); in startsNextParameter()
137 const FormatStyle &Style) { in opensProtoMessageField()
140 return Style.Language == FormatStyle::LK_TextProto || in opensProtoMessageField()
141 (Style.Language == FormatStyle::LK_Proto && in opensProtoMessageField()
174 getCanonicalRawStringDelimiter(const FormatStyle &Style, in getCanonicalRawStringDelimiter()
[all …]
H A DUnwrappedLineFormatter.cpp40 LevelIndentTracker(const FormatStyle &Style, in LevelIndentTracker()
98 if (Style.Language == FormatStyle::LK_Java || in getIndentOffset()
99 Style.Language == FormatStyle::LK_JavaScript || Style.isCSharp()) in getIndentOffset()
127 const FormatStyle &Style;
171 LineJoiner(const FormatStyle &Style, const AdditionalKeywords &Keywords, in LineJoiner()
266 Style.AllowShortFunctionsOnASingleLine == FormatStyle::SFS_All || in tryFitMultipleLinesInOne()
267 (Style.AllowShortFunctionsOnASingleLine >= FormatStyle::SFS_Empty && in tryFitMultipleLinesInOne()
269 (Style.AllowShortFunctionsOnASingleLine & FormatStyle::SFS_InlineOnly && in tryFitMultipleLinesInOne()
315 return Style.AllowShortBlocksOnASingleLine != FormatStyle::SBS_Never in tryFitMultipleLinesInOne()
327 FormatStyle::BWACS_MultiLine) { in tryFitMultipleLinesInOne()
[all …]
H A DContinuationIndenter.h39 llvm::StringMap<FormatStyle> DelimiterStyle;
40 llvm::StringMap<FormatStyle> EnclosingFunctionStyle;
42 RawStringFormatStyleManager(const FormatStyle &CodeStyle);
44 llvm::Optional<FormatStyle> getDelimiterStyle(StringRef Delimiter) const;
46 llvm::Optional<FormatStyle>
54 ContinuationIndenter(const FormatStyle &Style,
113 const FormatStyle &RawStringStyle,
123 llvm::Optional<FormatStyle> getRawStringStyle(const FormatToken &Current,
191 FormatStyle Style;
H A DWhitespaceManager.cpp403 const FormatStyle &Style, F &&Matches, in AlignTokens()
405 const FormatStyle::AlignConsecutiveStyle &ACS = FormatStyle::ACS_None) { in AlignTokens()
460 (ACS != FormatStyle::ACS_AcrossEmptyLines) && in AlignTokens()
461 (ACS != FormatStyle::ACS_AcrossEmptyLinesAndComments); in AlignTokens()
468 ((ACS == FormatStyle::ACS_AcrossComments) || in AlignTokens()
469 (ACS == FormatStyle::ACS_AcrossEmptyLinesAndComments))); in AlignTokens()
585 if (Style.AlignConsecutiveMacros == FormatStyle::ACS_None) in alignConsecutiveMacros()
638 (Style.AlignConsecutiveMacros != FormatStyle::ACS_AcrossEmptyLines) && in alignConsecutiveMacros()
640 FormatStyle::ACS_AcrossEmptyLinesAndComments); in alignConsecutiveMacros()
647 FormatStyle::ACS_AcrossComments) || in alignConsecutiveMacros()
[all …]
H A DBreakableToken.h34 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 DMacros.h59 struct FormatStyle;
107 clang::SourceManager &SourceMgr, const FormatStyle &Style,
131 const 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()
94 if (Style.Language == FormatStyle::LK_JavaScript) { in getCommentSplit()
130 if (Style.Language == FormatStyle::LK_JavaScript && 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()
463 if (Style.Language == FormatStyle::LK_JavaScript || in BreakableBlockComment()
464 Style.Language == FormatStyle::LK_Java) { in BreakableBlockComment()
[all …]
H A DFormatTokenLexer.cpp27 const FormatStyle &Style, encoding::Encoding Encoding, in FormatTokenLexer()
66 if (Style.Language == FormatStyle::LK_JavaScript) { in lex()
70 if (Style.Language == FormatStyle::LK_TextProto) in lex()
95 if (Style.Language == FormatStyle::LK_JavaScript || Style.isCSharp()) { in tryMergePreviousTokens()
140 if (Style.Language == FormatStyle::LK_JavaScript) { in tryMergePreviousTokens()
175 if (Style.Language == FormatStyle::LK_Java) { in tryMergePreviousTokens()
906 if ((Style.Language == FormatStyle::LK_JavaScript || in getNextToken()
907 Style.Language == FormatStyle::LK_Java) && in getNextToken()
963 if (Style.Language == FormatStyle::LK_Java && in getNextToken()
968 } else if (Style.Language == FormatStyle::LK_JavaScript && in getNextToken()
[all …]
H A DUnwrappedLineFormatter.h32 const FormatStyle &Style, in UnwrappedLineFormatter()
67 const FormatStyle &Style;
H A DTokenAnalyzer.h82 TokenAnalyzer(const Environment &Env, const FormatStyle &Style);
96 FormatStyle Style;
H A DFormatTokenLexer.h41 const FormatStyle &Style, encoding::Encoding Encoding,
106 const FormatStyle &Style;
H A DWhitespaceManager.h40 WhitespaceManager(const SourceManager &SourceMgr, const FormatStyle &Style, in WhitespaceManager()
228 const FormatStyle &Style;
H A DFormatToken.h647 bool opensBlockOrBlockTypeList(const FormatStyle &Style) const { in opensBlockOrBlockTypeList()
657 (is(tok::less) && (Style.Language == FormatStyle::LK_Proto || in opensBlockOrBlockTypeList()
658 Style.Language == FormatStyle::LK_TextProto)); in opensBlockOrBlockTypeList()
663 bool isCppStructuredBinding(const FormatStyle &Style) const { in isCppStructuredBinding()
675 bool closesBlockOrBlockTypeList(const FormatStyle &Style) const { in closesBlockOrBlockTypeList()
735 TokenRole(const FormatStyle &Style) : Style(Style) {} in TokenRole()
768 const FormatStyle &Style;
773 CommaSeparatedList(const FormatStyle &Style) in CommaSeparatedList()
H A DUnwrappedLineParser.h77 UnwrappedLineParser(const FormatStyle &Style,
224 const FormatStyle &Style;
H A DTokenAnnotator.h159 TokenAnnotator(const FormatStyle &Style, const AdditionalKeywords &Keywords) in TokenAnnotator()
192 const FormatStyle &Style;
H A DSortJavaScriptImports.h27 tooling::Replacements sortJavaScriptImports(const FormatStyle &Style,
H A DFormatInternal.h72 reformat(const FormatStyle &Style, StringRef Code,
H A DUsingDeclarationsSorter.h25 UsingDeclarationsSorter(const Environment &Env, const FormatStyle &Style);
/netbsd-src/external/apache2/llvm/dist/clang/include/clang/Format/
H A DFormat.h55 struct FormatStyle { struct
3249 bool operator==(const FormatStyle &R) const { argument
3388 llvm::Optional<FormatStyle> GetLanguageStyle(LanguageKind Language) const;
3398 typedef std::map<FormatStyle::LanguageKind, FormatStyle> MapType;
3400 llvm::Optional<FormatStyle> Get(FormatStyle::LanguageKind Language) const;
3407 void Add(FormatStyle Style);
3417 const FormatStyle &MainStyle,
3418 const std::vector<FormatStyle> &ConfigurationStyles);
3424 parseConfiguration(llvm::MemoryBufferRef Config, FormatStyle *Style,
3432 FormatStyle getLLVMStyle(
[all …]
/netbsd-src/external/apache2/llvm/dist/clang/docs/
H A DLibFormat.rst25 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();
/netbsd-src/external/apache2/llvm/dist/clang/tools/clang-format/
H A DClangFormat.cpp397 llvm::Expected<FormatStyle> FormatStyle = in format() local
400 if (!FormatStyle) { in format()
401 llvm::errs() << llvm::toString(FormatStyle.takeError()) << "\n"; in format()
407 FormatStyle->SortIncludes = FormatStyle::SI_CaseSensitive; in format()
409 FormatStyle->SortIncludes = FormatStyle::SI_Never; in format()
412 Replacements Replaces = sortIncludes(*FormatStyle, Code->getBuffer(), Ranges, in format()
423 reformat(*FormatStyle, *ChangedCode, Ranges, AssumedFileName, &Status); in format()
489 llvm::Expected<clang::format::FormatStyle> FormatStyle = in dumpConfig() local
492 if (!FormatStyle) { in dumpConfig()
493 llvm::errs() << llvm::toString(FormatStyle.takeError()) << "\n"; in dumpConfig()
[all …]
/netbsd-src/external/apache2/llvm/dist/clang/tools/clang-format/fuzzer/
H A DClangFormatFuzzer.cpp20 auto Style = getGoogleStyle(clang::format::FormatStyle::LK_Cpp); in LLVMFuzzerTestOneInput()

12