Home
last modified time | relevance | path

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

/minix3/external/bsd/llvm/dist/clang/lib/Format/
H A DFormat.cpp36 using clang::format::FormatStyle;
42 template <> struct ScalarEnumerationTraits<FormatStyle::LanguageKind> {
43 static void enumeration(IO &IO, FormatStyle::LanguageKind &Value) { in enumeration()
44 IO.enumCase(Value, "Cpp", FormatStyle::LK_Cpp); in enumeration()
45 IO.enumCase(Value, "Java", FormatStyle::LK_Java); in enumeration()
46 IO.enumCase(Value, "JavaScript", FormatStyle::LK_JavaScript); in enumeration()
47 IO.enumCase(Value, "Proto", FormatStyle::LK_Proto); in enumeration()
51 template <> struct ScalarEnumerationTraits<FormatStyle::LanguageStandard> {
52 static void enumeration(IO &IO, FormatStyle::LanguageStandard &Value) { in enumeration()
53 IO.enumCase(Value, "Cpp03", FormatStyle::LS_Cpp03); in enumeration()
[all …]
H A 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);
H A DUnwrappedLineParser.cpp157 const FormatStyle &Style, unsigned &LineLevel) in CompoundStatementIndenter()
159 if (Style.BreakBeforeBraces == FormatStyle::BS_Allman) { in CompoundStatementIndenter()
161 } else if (Style.BreakBeforeBraces == FormatStyle::BS_GNU) { in CompoundStatementIndenter()
204 UnwrappedLineParser::UnwrappedLineParser(const FormatStyle &Style, in UnwrappedLineParser()
337 if (Style.Language == FormatStyle::LK_Proto) { in calculateBraceTypes()
438 static bool ShouldBreakBeforeBrace(const FormatStyle &Style, in ShouldBreakBeforeBrace()
441 case FormatStyle::BS_Linux: in ShouldBreakBeforeBrace()
443 case FormatStyle::BS_Allman: in ShouldBreakBeforeBrace()
444 case FormatStyle::BS_GNU: in ShouldBreakBeforeBrace()
456 Style.Language == FormatStyle::LK_JavaScript && IsGoogScope(*Line); in parseChildBlock()
[all …]
H A DTokenAnnotator.cpp34 AnnotatingParser(const FormatStyle &Style, AnnotatedLine &Line, in AnnotatingParser()
54 if (Style.Language == FormatStyle::LK_Java && in parseAngle()
67 Style.Language == FormatStyle::LK_Java) { in parseAngle()
304 Style.Language != FormatStyle::LK_Proto && in parseSquare()
342 Style.Language == FormatStyle::LK_Proto) && in parseBrace()
358 (Style.Language == FormatStyle::LK_JavaScript && in updateParameterCount()
620 if ((Style.Language == FormatStyle::LK_Java && in parseLine()
667 return Style.Language == FormatStyle::LK_JavaScript && in IsImportStatement()
817 Style.Language == FormatStyle::LK_Java) { in determineTokenType()
866 else if (Style.Language == FormatStyle::LK_Java && Current.Previous && in determineTokenType()
[all …]
H A DUnwrappedLineFormatter.h35 const FormatStyle &Style) in UnwrappedLineFormatter()
78 if (Style.Language == FormatStyle::LK_Java) in getIndentOffset()
155 FormatStyle Style;
H A DWhitespaceManager.h40 WhitespaceManager(SourceManager &SourceMgr, const FormatStyle &Style, in WhitespaceManager()
196 const FormatStyle &Style;
H A DUnwrappedLineFormatter.cpp30 LineJoiner(const FormatStyle &Style) : Style(Style) {} in LineJoiner()
59 Style.AllowShortFunctionsOnASingleLine == FormatStyle::SFS_All || in tryFitMultipleLinesInOne()
60 (Style.AllowShortFunctionsOnASingleLine == FormatStyle::SFS_Empty && in tryFitMultipleLinesInOne()
62 (Style.AllowShortFunctionsOnASingleLine == FormatStyle::SFS_Inline && in tryFitMultipleLinesInOne()
70 return Style.BreakBeforeBraces == FormatStyle::BS_Attach in tryFitMultipleLinesInOne()
75 Style.BreakBeforeBraces != FormatStyle::BS_Attach) { in tryFitMultipleLinesInOne()
137 if ((Style.BreakBeforeBraces == FormatStyle::BS_Allman || in tryMergeSimpleControlStatement()
138 Style.BreakBeforeBraces == FormatStyle::BS_GNU) && in tryMergeSimpleControlStatement()
194 if (Style.Language != FormatStyle::LK_Java && in tryMergeSimpleBlock()
288 const FormatStyle &Style;
H A DUnwrappedLineParser.h63 UnwrappedLineParser(const FormatStyle &Style,
163 const FormatStyle &Style;
H A DFormatToken.h410 bool opensBlockTypeList(const FormatStyle &Style) const { in opensBlockTypeList()
418 bool closesBlockTypeList(const FormatStyle &Style) const { in closesBlockTypeList()
448 TokenRole(const FormatStyle &Style) : Style(Style) {} in TokenRole()
479 const FormatStyle &Style;
484 CommaSeparatedList(const FormatStyle &Style) in CommaSeparatedList()
H A DTokenAnnotator.h112 TokenAnnotator(const FormatStyle &Style, const AdditionalKeywords &Keywords) in TokenAnnotator()
141 const FormatStyle &Style;
H A DContinuationIndenter.h39 ContinuationIndenter(const FormatStyle &Style,
138 FormatStyle Style;
H A 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()
254 encoding::Encoding Encoding, const FormatStyle &Style) in BreakableBlockComment()
H A DContinuationIndenter.cpp49 const FormatStyle &Style) { in startsNextParameter()
59 ContinuationIndenter::ContinuationIndenter(const FormatStyle &Style, in ContinuationIndenter()
166 ((Style.AllowShortFunctionsOnASingleLine != FormatStyle::SFS_All) || in mustBreak()
172 if (Style.BreakBeforeBinaryOperators == FormatStyle::BOS_None) { in mustBreak()
511 if (Style.Language == FormatStyle::LK_Java && in getNewLineColumn()
732 (Style.Language != FormatStyle::LK_Java && *I > 0)) && in moveStatePastFakeLParens()
749 Style.BreakBeforeBinaryOperators != FormatStyle::BOS_None) || in moveStatePastFakeLParens()
823 Style.Language == FormatStyle::LK_Proto || !Style.BinPackParameters || in moveStatePastScopeOpener()
930 if (Style.Language == FormatStyle::LK_Java || in breakProtrudingToken()
931 Style.Language == FormatStyle::LK_JavaScript) in breakProtrudingToken()
H A DWhitespaceManager.cpp318 case FormatStyle::UT_Never: in appendIndentText()
321 case FormatStyle::UT_Always: { in appendIndentText()
333 case FormatStyle::UT_ForIndentation: in appendIndentText()
/minix3/external/bsd/llvm/dist/clang/unittests/Format/
H A DFormatTest.cpp20 FormatStyle getGoogleStyle() { in getGoogleStyle()
21 return getGoogleStyle(FormatStyle::LK_Cpp); in getGoogleStyle()
27 const FormatStyle &Style) { in format()
40 format(llvm::StringRef Code, const FormatStyle &Style = getLLVMStyle()) { in format()
44 FormatStyle getLLVMStyleWithColumns(unsigned ColumnLimit) { in getLLVMStyleWithColumns()
45 FormatStyle Style = getLLVMStyle(); in getLLVMStyleWithColumns()
50 FormatStyle getGoogleStyleWithColumns(unsigned ColumnLimit) { in getGoogleStyleWithColumns()
51 FormatStyle Style = getGoogleStyle(); in getGoogleStyleWithColumns()
57 const FormatStyle &Style = getLLVMStyle()) { in verifyFormat()
329 FormatStyle AllowsMergedIf = getLLVMStyle(); in TEST_F()
[all …]
H A DFormatTestJS.cpp23 unsigned Length, const FormatStyle &Style) { in format()
36 const FormatStyle &Style = getGoogleStyle(FormatStyle::LK_JavaScript)) { in format()
40 static FormatStyle getGoogleJSStyleWithColumns(unsigned ColumnLimit) { in getGoogleJSStyleWithColumns()
41 FormatStyle Style = getGoogleStyle(FormatStyle::LK_JavaScript); in getGoogleJSStyleWithColumns()
48 const FormatStyle &Style = getGoogleStyle(FormatStyle::LK_JavaScript)) { in verifyFormat()
154 getChromiumStyle(FormatStyle::LK_JavaScript)); in TEST_F()
276 FormatStyle Style = getGoogleStyle(FormatStyle::LK_JavaScript); in TEST_F()
277 Style.AllowShortFunctionsOnASingleLine = FormatStyle::SFS_Inline; in TEST_F()
292 Style.AllowShortFunctionsOnASingleLine = FormatStyle::SFS_All; in TEST_F()
303 Style.AllowShortFunctionsOnASingleLine = FormatStyle::SFS_None; in TEST_F()
H A 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()
84 getChromiumStyle(FormatStyle::LK_Java)); in TEST_F()
221 FormatStyle Style = getStyleWithColumns(65); in TEST_F()
H A DFormatTestProto.cpp23 unsigned Length, const FormatStyle &Style) { in format()
35 FormatStyle Style = getGoogleStyle(FormatStyle::LK_Proto); in format()
/minix3/external/bsd/llvm/dist/clang/include/clang/Format/
H A DFormat.h42 struct FormatStyle { struct
411 bool operator==(const FormatStyle &R) const { argument
482 FormatStyle getLLVMStyle();
488 FormatStyle getGoogleStyle(FormatStyle::LanguageKind Language);
492 FormatStyle getChromiumStyle(FormatStyle::LanguageKind Language);
496 FormatStyle getMozillaStyle();
500 FormatStyle getWebKitStyle();
504 FormatStyle getGNUStyle();
507 FormatStyle getNoStyle();
515 bool getPredefinedStyle(StringRef Name, FormatStyle::LanguageKind Language,
[all …]
/minix3/external/bsd/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
47 FormatStyle getLLVMStyle();
51 FormatStyle getGoogleStyle();
H A DClangFormatStyleOptions.rst110 by supplying the `clang::format::FormatStyle
/minix3/external/bsd/llvm/dist/clang/tools/clang-format/
H A DClangFormat.cpp226 FormatStyle FormatStyle = getStyle( in format() local
228 tooling::Replacements Replaces = reformat(FormatStyle, Sources, ID, Ranges); in format()