/external/clang/lib/Format/ |
D | Format.cpp | 44 using clang::format::FormatStyle; 47 LLVM_YAML_IS_SEQUENCE_VECTOR(clang::format::FormatStyle::IncludeCategory) 51 template <> struct ScalarEnumerationTraits<FormatStyle::LanguageKind> { 52 static void enumeration(IO &IO, FormatStyle::LanguageKind &Value) { in enumeration() 53 IO.enumCase(Value, "Cpp", FormatStyle::LK_Cpp); in enumeration() 54 IO.enumCase(Value, "Java", FormatStyle::LK_Java); in enumeration() 55 IO.enumCase(Value, "JavaScript", FormatStyle::LK_JavaScript); in enumeration() 56 IO.enumCase(Value, "Proto", FormatStyle::LK_Proto); in enumeration() 57 IO.enumCase(Value, "TableGen", FormatStyle::LK_TableGen); in enumeration() 61 template <> struct ScalarEnumerationTraits<FormatStyle::LanguageStandard> { [all …]
|
D | TokenAnnotator.cpp | 35 AnnotatingParser(const FormatStyle &Style, AnnotatedLine &Line, in AnnotatingParser() 74 if (Style.Language == FormatStyle::LK_Java && in parseAngle() 87 Style.Language == FormatStyle::LK_Java) { in parseAngle() 137 } else if (Style.Language == FormatStyle::LK_JavaScript && in parseParens() 148 } else if (Style.Language == FormatStyle::LK_JavaScript && Left->Previous && in parseParens() 154 } else if (Style.Language == FormatStyle::LK_JavaScript && Left->Previous && in parseParens() 309 Style.Language == FormatStyle::LK_Cpp && in parseSquare() 324 } else if (Style.Language == FormatStyle::LK_JavaScript && Parent && in parseSquare() 328 } else if (Style.Language == FormatStyle::LK_Proto || in parseSquare() 425 Style.Language != FormatStyle::LK_Cpp)) || in parseBrace() [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() 335 if (Style.Language == FormatStyle::LK_JavaScript && PrevTok && in calculateBraceTypes() 349 if (Style.Language == FormatStyle::LK_Proto) { in calculateBraceTypes() 366 (Style.Language == FormatStyle::LK_JavaScript && in calculateBraceTypes() 471 static bool ShouldBreakBeforeBrace(const FormatStyle &Style, in ShouldBreakBeforeBrace() 489 Style.Language == FormatStyle::LK_JavaScript && isGoogScope(*Line); in parseChildBlock() 747 if (Style.Language == FormatStyle::LK_TableGen && in parseStructuralElement() 828 if (Style.Language == FormatStyle::LK_Java || 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 | FormatTokenLexer.h | 32 const FormatStyle &Style, encoding::Encoding Encoding); 74 const FormatStyle &Style;
|
D | ContinuationIndenter.cpp | 55 const FormatStyle &Style) { in startsNextParameter() 65 ContinuationIndenter::ContinuationIndenter(const FormatStyle &Style, in ContinuationIndenter() 135 if (Style.AlwaysBreakAfterReturnType == FormatStyle::RTBS_None) in canBreak() 154 Style.Language == FormatStyle::LK_Cpp && in mustBreak() 178 ((Style.AllowShortFunctionsOnASingleLine != FormatStyle::SFS_All) || in mustBreak() 355 if (Style.AlignAfterOpenBracket == FormatStyle::BAS_AlwaysBreak && in addTokenOnCurrentLine() 372 if (Style.AlignAfterOpenBracket != FormatStyle::BAS_DontAlign && in addTokenOnCurrentLine() 382 if (Current.is(TT_LambdaArrow) && Style.Language == FormatStyle::LK_Java) in addTokenOnCurrentLine() 482 (Style.Language != FormatStyle::LK_JavaScript || in addTokenOnNewLine() 559 Style.Language != FormatStyle::LK_Cpp && in addTokenOnNewLine() [all …]
|
D | FormatTokenLexer.cpp | 27 const FormatStyle &Style, in FormatTokenLexer() 50 if (Style.Language == FormatStyle::LK_JavaScript) { in lex() 69 if (Style.Language == FormatStyle::LK_JavaScript) { in tryMergePreviousTokens() 489 if (Style.Language == FormatStyle::LK_Java && in getNextToken() 494 } else if (Style.Language == FormatStyle::LK_JavaScript && in getNextToken() 534 if (Style.Language == FormatStyle::LK_Cpp) { in getNextToken() 563 } else if (Style.Language == FormatStyle::LK_JavaScript && in readRawToken() 569 if (Style.Language == FormatStyle::LK_JavaScript && in readRawToken()
|
D | WhitespaceManager.h | 40 WhitespaceManager(const SourceManager &SourceMgr, const FormatStyle &Style, in WhitespaceManager() 208 const FormatStyle &Style;
|
D | TokenAnalyzer.h | 82 TokenAnalyzer(const Environment &Env, const FormatStyle &Style); 96 FormatStyle Style;
|
D | UnwrappedLineParser.h | 63 UnwrappedLineParser(const FormatStyle &Style, 162 const FormatStyle &Style;
|
D | FormatToken.h | 430 bool opensBlockOrBlockTypeList(const FormatStyle &Style) const { in opensBlockOrBlockTypeList() 438 bool closesBlockOrBlockTypeList(const FormatStyle &Style) const { in closesBlockOrBlockTypeList() 481 TokenRole(const FormatStyle &Style) : Style(Style) {} in TokenRole() 512 const FormatStyle &Style; 517 CommaSeparatedList(const FormatStyle &Style) in CommaSeparatedList()
|
D | TokenAnnotator.h | 139 TokenAnnotator(const FormatStyle &Style, const AdditionalKeywords &Keywords) in TokenAnnotator() 170 const FormatStyle &Style;
|
/external/clang/unittests/Format/ |
D | FormatTest.cpp | 26 FormatStyle getGoogleStyle() { return getGoogleStyle(FormatStyle::LK_Cpp); } in getGoogleStyle() 37 const FormatStyle &Style = getLLVMStyle(), in format() 56 FormatStyle getLLVMStyleWithColumns(unsigned ColumnLimit) { in getLLVMStyleWithColumns() 57 FormatStyle Style = getLLVMStyle(); in getLLVMStyleWithColumns() 62 FormatStyle getGoogleStyleWithColumns(unsigned ColumnLimit) { in getGoogleStyleWithColumns() 63 FormatStyle Style = getGoogleStyle(); in getGoogleStyleWithColumns() 69 const FormatStyle &Style = getLLVMStyle()) { in verifyFormat() 74 const FormatStyle &Style = getLLVMStyle()) { in verifyIncompleteFormat() 90 const FormatStyle &Style = getLLVMStyle()) { in verifyNoCrash() 298 FormatStyle AllowsMergedIf = getLLVMStyle(); in TEST_F() [all …]
|
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() 59 const FormatStyle &Style = getGoogleStyle(FormatStyle::LK_JavaScript)) { in verifyFormat() 104 FormatStyle Style = getGoogleJSStyleWithColumns(80); in TEST_F() 109 Style.BreakBeforeBinaryOperators = FormatStyle::BOS_All; in TEST_F() 278 getChromiumStyle(FormatStyle::LK_JavaScript)); in TEST_F() 516 FormatStyle Style = getGoogleStyle(FormatStyle::LK_JavaScript); 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 | FormatTestProto.cpp | 23 unsigned Length, const FormatStyle &Style) { in format() 35 FormatStyle Style = getGoogleStyle(FormatStyle::LK_Proto); in format()
|
D | FormatTestSelective.cpp | 37 FormatStyle Style = getLLVMStyle(); 463 Style.UseTab = FormatStyle::UT_Always; in TEST_F() 516 Style = getGoogleStyle(FormatStyle::LK_JavaScript); in TEST_F()
|
D | CleanupTest.cpp | 25 const FormatStyle &Style = getLLVMStyle()) { in cleanup() 111 FormatStyle Style = getLLVMStyle(); in TEST_F() 288 FormatStyle Style = getLLVMStyle(); 373 Style = format::getGoogleStyle(format::FormatStyle::LanguageKind::LK_Cpp); in TEST_F() 398 Style = format::getGoogleStyle(format::FormatStyle::LanguageKind::LK_Cpp); in TEST_F() 451 Style = format::getGoogleStyle(format::FormatStyle::LanguageKind::LK_Cpp); in TEST_F() 472 Style = format::getGoogleStyle(format::FormatStyle::LanguageKind::LK_Cpp); in TEST_F() 509 Style = format::getGoogleStyle(format::FormatStyle::LanguageKind::LK_Cpp); in TEST_F()
|
D | SortImportsTestJS.cpp | 45 FormatStyle Style = getGoogleStyle(FormatStyle::LK_JavaScript);
|
D | SortIncludesTest.cpp | 43 FormatStyle Style = getLLVMStyle(); 159 Style = getGoogleStyle(FormatStyle::LK_Cpp); in TEST_F()
|
/external/clang/include/clang/Format/ |
D | Format.h | 46 struct FormatStyle { struct 633 bool operator==(const FormatStyle &R) const { argument 717 FormatStyle getLLVMStyle(); 723 FormatStyle getGoogleStyle(FormatStyle::LanguageKind Language); 727 FormatStyle getChromiumStyle(FormatStyle::LanguageKind Language); 731 FormatStyle getMozillaStyle(); 735 FormatStyle getWebKitStyle(); 739 FormatStyle getGNUStyle(); 742 FormatStyle getNoStyle(); 750 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() 269 Replacements FormatChanges = reformat(FormatStyle, *ChangedCode, Ranges, in format()
|