Home
last modified time | relevance | path

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

12

/external/clang/lib/Format/
DFormat.cpp37 using clang::format::FormatStyle;
40 LLVM_YAML_IS_SEQUENCE_VECTOR(clang::format::FormatStyle::IncludeCategory)
44 template <> struct ScalarEnumerationTraits<FormatStyle::LanguageKind> {
45 static void enumeration(IO &IO, FormatStyle::LanguageKind &Value) { in enumeration()
46 IO.enumCase(Value, "Cpp", FormatStyle::LK_Cpp); in enumeration()
47 IO.enumCase(Value, "Java", FormatStyle::LK_Java); in enumeration()
48 IO.enumCase(Value, "JavaScript", FormatStyle::LK_JavaScript); in enumeration()
49 IO.enumCase(Value, "Proto", FormatStyle::LK_Proto); in enumeration()
53 template <> struct ScalarEnumerationTraits<FormatStyle::LanguageStandard> {
54 static void enumeration(IO &IO, FormatStyle::LanguageStandard &Value) { in enumeration()
[all …]
DTokenAnnotator.cpp35 AnnotatingParser(const FormatStyle &Style, AnnotatedLine &Line, in AnnotatingParser()
61 if (Style.Language == FormatStyle::LK_Java && in parseAngle()
74 Style.Language == FormatStyle::LK_Java) { in parseAngle()
264 Style.Language == FormatStyle::LK_Cpp && in parseSquare()
279 } else if (Style.Language == FormatStyle::LK_JavaScript && Parent && in parseSquare()
377 Style.Language != FormatStyle::LK_Cpp)) || in parseBrace()
378 Style.Language == FormatStyle::LK_Proto) && in parseBrace()
382 Style.Language == FormatStyle::LK_JavaScript) in parseBrace()
444 if (Style.Language == FormatStyle::LK_JavaScript) { in consumeToken()
573 if (Style.Language == FormatStyle::LK_JavaScript && Tok->Next && in consumeToken()
[all …]
DBreakableToken.h28 struct FormatStyle;
77 const FormatStyle &Style) in BreakableToken()
85 const FormatStyle &Style;
102 const FormatStyle &Style);
123 encoding::Encoding Encoding, const FormatStyle &Style);
141 encoding::Encoding Encoding, const FormatStyle &Style);
168 encoding::Encoding Encoding, const FormatStyle &Style);
DUnwrappedLineParser.cpp155 const FormatStyle &Style, unsigned &LineLevel) in CompoundStatementIndenter()
200 UnwrappedLineParser::UnwrappedLineParser(const FormatStyle &Style, in UnwrappedLineParser()
258 !Line->InPPDirective && Style.Language != FormatStyle::LK_JavaScript; in parseFile()
341 if (Style.Language == FormatStyle::LK_Proto) { in calculateBraceTypes()
457 static bool ShouldBreakBeforeBrace(const FormatStyle &Style, in ShouldBreakBeforeBrace()
475 Style.Language == FormatStyle::LK_JavaScript && isGoogScope(*Line); in parseChildBlock()
727 if (Style.Language == FormatStyle::LK_Java || in parseStructuralElement()
728 Style.Language == FormatStyle::LK_JavaScript) in parseStructuralElement()
769 if (Style.Language == FormatStyle::LK_JavaScript) { in parseStructuralElement()
784 if (Style.Language == FormatStyle::LK_JavaScript && in parseStructuralElement()
[all …]
DUnwrappedLineFormatter.cpp39 LevelIndentTracker(const FormatStyle &Style, in LevelIndentTracker()
88 if (Style.Language == FormatStyle::LK_Java || in getIndentOffset()
89 Style.Language == FormatStyle::LK_JavaScript) in getIndentOffset()
112 const FormatStyle &Style;
131 LineJoiner(const FormatStyle &Style, const AdditionalKeywords &Keywords, in LineJoiner()
191 Style.AllowShortFunctionsOnASingleLine == FormatStyle::SFS_All || in tryFitMultipleLinesInOne()
192 (Style.AllowShortFunctionsOnASingleLine >= FormatStyle::SFS_Empty && in tryFitMultipleLinesInOne()
194 (Style.AllowShortFunctionsOnASingleLine == FormatStyle::SFS_Inline && in tryFitMultipleLinesInOne()
326 if (Style.Language != FormatStyle::LK_Java && in tryMergeSimpleBlock()
446 const FormatStyle &Style;
[all …]
DUnwrappedLineFormatter.h35 const FormatStyle &Style, in UnwrappedLineFormatter()
66 const FormatStyle &Style;
DContinuationIndenter.cpp49 const FormatStyle &Style) { in startsNextParameter()
59 ContinuationIndenter::ContinuationIndenter(const FormatStyle &Style, in ContinuationIndenter()
129 if (Style.AlwaysBreakAfterReturnType == FormatStyle::RTBS_None) in canBreak()
165 ((Style.AllowShortFunctionsOnASingleLine != FormatStyle::SFS_All) || in mustBreak()
334 if (Style.AlignAfterOpenBracket == FormatStyle::BAS_AlwaysBreak && in addTokenOnCurrentLine()
340 if (Style.AlignAfterOpenBracket != FormatStyle::BAS_DontAlign && in addTokenOnCurrentLine()
350 if (Current.is(TT_LambdaArrow) && Style.Language == FormatStyle::LK_Java) in addTokenOnCurrentLine()
447 if (Style.Language != FormatStyle::LK_JavaScript || in addTokenOnNewLine()
517 Style.Language != FormatStyle::LK_Cpp && in addTokenOnNewLine()
569 if (Style.Language == FormatStyle::LK_Java && in getNewLineColumn()
[all …]
DFormatToken.h415 bool opensBlockOrBlockTypeList(const FormatStyle &Style) const { in opensBlockOrBlockTypeList()
423 bool closesBlockOrBlockTypeList(const FormatStyle &Style) const { in closesBlockOrBlockTypeList()
438 TokenRole(const FormatStyle &Style) : Style(Style) {} in TokenRole()
469 const FormatStyle &Style;
474 CommaSeparatedList(const FormatStyle &Style) in CommaSeparatedList()
DWhitespaceManager.h40 WhitespaceManager(SourceManager &SourceMgr, const FormatStyle &Style, in WhitespaceManager()
203 const FormatStyle &Style;
DUnwrappedLineParser.h63 UnwrappedLineParser(const FormatStyle &Style,
160 const FormatStyle &Style;
DTokenAnnotator.h143 TokenAnnotator(const FormatStyle &Style, const AdditionalKeywords &Keywords) in TokenAnnotator()
174 const FormatStyle &Style;
DContinuationIndenter.h39 ContinuationIndenter(const FormatStyle &Style,
138 FormatStyle Style;
DBreakableToken.cpp147 encoding::Encoding Encoding, const FormatStyle &Style) in BreakableSingleLineToken()
158 encoding::Encoding Encoding, const FormatStyle &Style) in BreakableStringLiteral()
202 bool InPPDirective, encoding::Encoding Encoding, const FormatStyle &Style) in BreakableLineComment()
255 encoding::Encoding Encoding, const FormatStyle &Style) in BreakableBlockComment()
DWhitespaceManager.cpp187 static void AlignTokens(const FormatStyle &Style, F &&Matches, in AlignTokens()
511 case FormatStyle::UT_Never: in appendIndentText()
514 case FormatStyle::UT_Always: { in appendIndentText()
526 case FormatStyle::UT_ForIndentation: in appendIndentText()
DFormatToken.cpp158 if (Style.AlignAfterOpenBracket == FormatStyle::BAS_DontAlign) in precomputeFormattingInfos()
/external/clang/unittests/Format/
DFormatTest.cpp21 FormatStyle getGoogleStyle() { return getGoogleStyle(FormatStyle::LK_Cpp); } in getGoogleStyle()
32 const FormatStyle &Style = getLLVMStyle(), in format()
51 FormatStyle getLLVMStyleWithColumns(unsigned ColumnLimit) { in getLLVMStyleWithColumns()
52 FormatStyle Style = getLLVMStyle(); in getLLVMStyleWithColumns()
57 FormatStyle getGoogleStyleWithColumns(unsigned ColumnLimit) { in getGoogleStyleWithColumns()
58 FormatStyle Style = getGoogleStyle(); in getGoogleStyleWithColumns()
64 const FormatStyle &Style = getLLVMStyle()) { in verifyFormat()
69 const FormatStyle &Style = getLLVMStyle()) { in verifyIncompleteFormat()
85 const FormatStyle &Style = getLLVMStyle()) { in verifyNoCrash()
293 FormatStyle AllowsMergedIf = getLLVMStyle(); in TEST_F()
[all …]
DFormatTestJava.cpp23 unsigned Length, const FormatStyle &Style) { in format()
36 const FormatStyle &Style = getGoogleStyle(FormatStyle::LK_Java)) { in format()
40 static FormatStyle getStyleWithColumns(unsigned ColumnLimit) { in getStyleWithColumns()
41 FormatStyle Style = getGoogleStyle(FormatStyle::LK_Java); in getStyleWithColumns()
48 const FormatStyle &Style = getGoogleStyle(FormatStyle::LK_Java)) { in verifyFormat()
62 FormatStyle Style = getStyleWithColumns(50); in TEST_F()
66 Style.BreakBeforeBinaryOperators = FormatStyle::BOS_None; in TEST_F()
86 getChromiumStyle(FormatStyle::LK_Java)); in TEST_F()
236 FormatStyle Style = getStyleWithColumns(65); in TEST_F()
282 getChromiumStyle(FormatStyle::LK_Java)); in TEST_F()
DFormatTestJS.cpp23 unsigned Length, const FormatStyle &Style) { in format()
39 const FormatStyle &Style = getGoogleStyle(FormatStyle::LK_JavaScript)) { in format()
43 static FormatStyle getGoogleJSStyleWithColumns(unsigned ColumnLimit) { in getGoogleJSStyleWithColumns()
44 FormatStyle Style = getGoogleStyle(FormatStyle::LK_JavaScript); in getGoogleJSStyleWithColumns()
51 const FormatStyle &Style = getGoogleStyle(FormatStyle::LK_JavaScript)) { in verifyFormat()
228 getChromiumStyle(FormatStyle::LK_JavaScript)); in TEST_F()
403 FormatStyle Style = getGoogleStyle(FormatStyle::LK_JavaScript); in TEST_F()
404 Style.AllowShortFunctionsOnASingleLine = FormatStyle::SFS_Inline; in TEST_F()
419 Style.AllowShortFunctionsOnASingleLine = FormatStyle::SFS_All; in TEST_F()
430 Style.AllowShortFunctionsOnASingleLine = FormatStyle::SFS_None; in TEST_F()
[all …]
DFormatTestProto.cpp23 unsigned Length, const FormatStyle &Style) { in format()
35 FormatStyle Style = getGoogleStyle(FormatStyle::LK_Proto); in format()
DSortIncludesTest.cpp37 FormatStyle Style = getLLVMStyle();
142 Style = getGoogleStyle(FormatStyle::LK_Cpp); in TEST_F()
DFormatTestSelective.cpp37 FormatStyle Style = getLLVMStyle();
439 Style.UseTab = FormatStyle::UT_Always; in TEST_F()
/external/clang/include/clang/Format/
DFormat.h42 struct FormatStyle { struct
589 bool operator==(const FormatStyle &R) const { argument
670 FormatStyle getLLVMStyle();
676 FormatStyle getGoogleStyle(FormatStyle::LanguageKind Language);
680 FormatStyle getChromiumStyle(FormatStyle::LanguageKind Language);
684 FormatStyle getMozillaStyle();
688 FormatStyle getWebKitStyle();
692 FormatStyle getGNUStyle();
695 FormatStyle getNoStyle();
703 bool getPredefinedStyle(StringRef Name, FormatStyle::LanguageKind Language,
[all …]
/external/clang/docs/
DLibFormat.rst25 tooling::Replacements reformat(const FormatStyle &Style, Lexer &Lex,
30 ranges in ``Ranges``. The ``FormatStyle`` controls basic decisions made during
47 FormatStyle getLLVMStyle();
51 FormatStyle getGoogleStyle();
/external/clang/tools/clang-format/
DClangFormat.cpp254 FormatStyle FormatStyle = getStyle(Style, AssumedFileName, FallbackStyle); in format() local
256 FormatStyle.SortIncludes = SortIncludes; in format()
258 Replacements Replaces = sortIncludes(FormatStyle, Code->getBuffer(), Ranges, in format()
266 Replacements FormatChanges = reformat(FormatStyle, ChangedCode, Ranges, in format()
/external/clang/tools/clang-format/fuzzer/
DClangFormatFuzzer.cpp21 auto Style = getGoogleStyle(clang::format::FormatStyle::LK_Cpp); in LLVMFuzzerTestOneInput()

12