/external/clang/lib/Format/ |
D | Format.cpp | 37 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 …]
|
D | TokenAnnotator.cpp | 35 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 …]
|
D | BreakableToken.h | 28 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);
|
D | UnwrappedLineParser.cpp | 155 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 …]
|
D | UnwrappedLineFormatter.cpp | 39 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 …]
|
D | UnwrappedLineFormatter.h | 35 const FormatStyle &Style, in UnwrappedLineFormatter() 66 const FormatStyle &Style;
|
D | ContinuationIndenter.cpp | 49 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 …]
|
D | FormatToken.h | 415 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()
|
D | WhitespaceManager.h | 40 WhitespaceManager(SourceManager &SourceMgr, const FormatStyle &Style, in WhitespaceManager() 203 const FormatStyle &Style;
|
D | UnwrappedLineParser.h | 63 UnwrappedLineParser(const FormatStyle &Style, 160 const FormatStyle &Style;
|
D | TokenAnnotator.h | 143 TokenAnnotator(const FormatStyle &Style, const AdditionalKeywords &Keywords) in TokenAnnotator() 174 const FormatStyle &Style;
|
D | ContinuationIndenter.h | 39 ContinuationIndenter(const FormatStyle &Style, 138 FormatStyle Style;
|
D | BreakableToken.cpp | 147 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()
|
D | WhitespaceManager.cpp | 187 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()
|
D | FormatToken.cpp | 158 if (Style.AlignAfterOpenBracket == FormatStyle::BAS_DontAlign) in precomputeFormattingInfos()
|
/external/clang/unittests/Format/ |
D | FormatTest.cpp | 21 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 …]
|
D | FormatTestJava.cpp | 23 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()
|
D | FormatTestJS.cpp | 23 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 …]
|
D | FormatTestProto.cpp | 23 unsigned Length, const FormatStyle &Style) { in format() 35 FormatStyle Style = getGoogleStyle(FormatStyle::LK_Proto); in format()
|
D | SortIncludesTest.cpp | 37 FormatStyle Style = getLLVMStyle(); 142 Style = getGoogleStyle(FormatStyle::LK_Cpp); in TEST_F()
|
D | FormatTestSelective.cpp | 37 FormatStyle Style = getLLVMStyle(); 439 Style.UseTab = FormatStyle::UT_Always; in TEST_F()
|
/external/clang/include/clang/Format/ |
D | Format.h | 42 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/ |
D | LibFormat.rst | 25 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/ |
D | ClangFormat.cpp | 254 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/ |
D | ClangFormatFuzzer.cpp | 21 auto Style = getGoogleStyle(clang::format::FormatStyle::LK_Cpp); in LLVMFuzzerTestOneInput()
|