Home
last modified time | relevance | path

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

/external/clang/unittests/Format/
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()
293 FormatStyle AllowsMergedIf = getLLVMStyle(); in TEST_F()
[all …]
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()
126 getChromiumStyle(FormatStyle::LK_JavaScript)); in TEST_F()
DFormatTestProto.cpp23 unsigned Length, const FormatStyle &Style) { in format()
35 FormatStyle Style = getGoogleStyle(FormatStyle::LK_Proto); in format()
/external/clang/lib/Format/
DFormat.cpp35 using clang::format::FormatStyle;
41 template <> struct ScalarEnumerationTraits<FormatStyle::LanguageKind> {
42 static void enumeration(IO &IO, FormatStyle::LanguageKind &Value) { in enumeration()
43 IO.enumCase(Value, "Cpp", FormatStyle::LK_Cpp); in enumeration()
44 IO.enumCase(Value, "JavaScript", FormatStyle::LK_JavaScript); in enumeration()
45 IO.enumCase(Value, "Proto", FormatStyle::LK_Proto); in enumeration()
49 template <> struct ScalarEnumerationTraits<FormatStyle::LanguageStandard> {
50 static void enumeration(IO &IO, FormatStyle::LanguageStandard &Value) { in enumeration()
51 IO.enumCase(Value, "Cpp03", FormatStyle::LS_Cpp03); in enumeration()
52 IO.enumCase(Value, "C++03", FormatStyle::LS_Cpp03); in enumeration()
[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.cpp158 const FormatStyle &Style, unsigned &LineLevel) in CompoundStatementIndenter()
160 if (Style.BreakBeforeBraces == FormatStyle::BS_Allman) { in CompoundStatementIndenter()
162 } else if (Style.BreakBeforeBraces == FormatStyle::BS_GNU) { in CompoundStatementIndenter()
205 UnwrappedLineParser::UnwrappedLineParser(const FormatStyle &Style, in UnwrappedLineParser()
338 if (Style.Language == FormatStyle::LK_Proto) { in calculateBraceTypes()
443 Style.Language == FormatStyle::LK_JavaScript && IsGoogScope(*Line); in parseChildBlock()
757 if (Style.BreakBeforeBraces != FormatStyle::BS_Attach) in parseStructuralElement()
775 if (Style.Language == FormatStyle::LK_JavaScript && Text == "function" && in parseStructuralElement()
949 if (Style.Language == FormatStyle::LK_JavaScript && in parseBracedList()
1070 if (Style.BreakBeforeBraces == FormatStyle::BS_Allman || in parseIfThenElse()
[all …]
DFormatToken.h378 bool opensBlockTypeList(const FormatStyle &Style) const { in opensBlockTypeList()
386 bool closesBlockTypeList(const FormatStyle &Style) const { in closesBlockTypeList()
416 TokenRole(const FormatStyle &Style) : Style(Style) {} in TokenRole()
447 const FormatStyle &Style;
452 CommaSeparatedList(const FormatStyle &Style) in CommaSeparatedList()
DWhitespaceManager.h40 WhitespaceManager(SourceManager &SourceMgr, const FormatStyle &Style, in WhitespaceManager()
196 const FormatStyle &Style;
DUnwrappedLineParser.h62 UnwrappedLineParser(const FormatStyle &Style, ArrayRef<FormatToken *> Tokens,
159 const FormatStyle &Style;
DTokenAnnotator.h111 TokenAnnotator(const FormatStyle &Style, IdentifierInfo &Ident_in) in TokenAnnotator()
140 const FormatStyle &Style;
DTokenAnnotator.cpp34 AnnotatingParser(const FormatStyle &Style, AnnotatedLine &Line, in AnnotatingParser()
283 Style.Language != FormatStyle::LK_Proto && in parseSquare()
319 Style.Language != FormatStyle::LK_Proto) { in parseBrace()
334 (Style.Language == FormatStyle::LK_JavaScript && in updateParameterCount()
988 const FormatStyle &Style;
1355 if (Style.Language == FormatStyle::LK_Proto) in splitPenalty()
1375 (Right.is(tok::period) && Style.Language == FormatStyle::LK_Proto)) in splitPenalty()
1448 if (Style.Language == FormatStyle::LK_Proto) { in spaceRequiredBetween()
1456 } else if (Style.Language == FormatStyle::LK_JavaScript) { in spaceRequiredBetween()
1497 return (Left.is(tok::less) && Style.Standard == FormatStyle::LS_Cpp03) || in spaceRequiredBetween()
[all …]
DContinuationIndenter.h38 ContinuationIndenter(const FormatStyle &Style, SourceManager &SourceMgr,
136 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()
254 encoding::Encoding Encoding, const FormatStyle &Style) in BreakableBlockComment()
DWhitespaceManager.cpp316 case FormatStyle::UT_Never: in appendIndentText()
319 case FormatStyle::UT_Always: { in appendIndentText()
331 case FormatStyle::UT_ForIndentation: in appendIndentText()
DContinuationIndenter.cpp49 const FormatStyle &Style) { in startsNextParameter()
59 ContinuationIndenter::ContinuationIndenter(const FormatStyle &Style, in ContinuationIndenter()
118 if (Style.Language == FormatStyle::LK_JavaScript && in canBreak()
158 ((Style.AllowShortFunctionsOnASingleLine != FormatStyle::SFS_All) || in mustBreak()
433 bool JavaScriptFormat = Style.Language == FormatStyle::LK_JavaScript && in addTokenOnNewLine()
630 if (Style.Language == FormatStyle::LK_JavaScript) { in moveStateToNextToken()
832 Style.Language == FormatStyle::LK_Proto || in moveStatePastScopeOpener()
/external/clang/include/clang/Format/
DFormat.h41 struct FormatStyle { struct
359 bool operator==(const FormatStyle &R) const { argument
422 FormatStyle getLLVMStyle();
428 FormatStyle getGoogleStyle(FormatStyle::LanguageKind Language);
432 FormatStyle getChromiumStyle(FormatStyle::LanguageKind Language);
436 FormatStyle getMozillaStyle();
440 FormatStyle getWebKitStyle();
444 FormatStyle getGNUStyle();
447 FormatStyle getNoStyle();
455 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();
DClangFormatStyleOptions.rst55 by supplying the `clang::format::FormatStyle
/external/clang/tools/clang-format/
DClangFormat.cpp226 FormatStyle FormatStyle = getStyle( in format() local
229 getFormattingLangOpts(FormatStyle.Standard)); in format()
230 tooling::Replacements Replaces = reformat(FormatStyle, Lex, Sources, Ranges); in format()