Home
last modified time | relevance | path

Searched refs:Style (Results 1 – 25 of 807) sorted by relevance

12345678910>>...33

/external/llvm-project/clang/unittests/Format/
DFormatTestCSharp.cpp22 unsigned Length, const FormatStyle &Style) { in format() argument
26 tooling::Replacements Replaces = reformat(Style, Code, Ranges); in format()
35 const FormatStyle &Style = getMicrosoftStyle(FormatStyle::LK_CSharp)) { in format() argument
36 return format(Code, 0, Code.size(), Style); in format()
40 FormatStyle Style = getMicrosoftStyle(FormatStyle::LK_CSharp); in getStyleWithColumns() local
41 Style.ColumnLimit = ColumnLimit; in getStyleWithColumns()
42 return Style; in getStyleWithColumns()
47 const FormatStyle &Style = getMicrosoftStyle(FormatStyle::LK_CSharp)) { in verifyFormat() argument
48 EXPECT_EQ(Code.str(), format(Code, Style)) << "Expected code is not stable"; in verifyFormat()
49 EXPECT_EQ(Code.str(), format(test::messUp(Code), Style)); in verifyFormat()
[all …]
DFormatTestObjC.cpp30 Style = getLLVMStyle(); in FormatTestObjC()
31 Style.Language = FormatStyle::LK_ObjC; in FormatTestObjC()
43 reformat(Style, Code, Ranges, "<stdin>", &Status); in format()
66 FormatStyle Style; member in clang::format::__anon8488ee0c0111::FormatTestObjC
74 auto Style = getStyle("LLVM", "a.h", "none", in TEST() local
77 ASSERT_TRUE((bool)Style); in TEST()
78 EXPECT_EQ(FormatStyle::LK_ObjC, Style->Language); in TEST()
80 Style = getStyle("LLVM", "a.h", "none", in TEST()
83 ASSERT_TRUE((bool)Style); in TEST()
84 EXPECT_EQ(FormatStyle::LK_ObjC, Style->Language); in TEST()
[all …]
DFormatTest.cpp35 const FormatStyle &Style = getLLVMStyle(), in format() argument
42 reformat(Style, Code, Ranges, "<stdin>", &Status); in format()
55 FormatStyle getStyleWithColumns(FormatStyle Style, unsigned ColumnLimit) { in getStyleWithColumns() argument
56 Style.ColumnLimit = ColumnLimit; in getStyleWithColumns()
57 return Style; in getStyleWithColumns()
70 const FormatStyle &Style = getLLVMStyle()) { in _verifyFormat() argument
72 EXPECT_EQ(Expected.str(), format(Expected, Style)) in _verifyFormat()
74 EXPECT_EQ(Expected.str(), format(Code, Style)); in _verifyFormat()
75 if (Style.Language == FormatStyle::LK_Cpp) { in _verifyFormat()
78 FormatStyle ObjCStyle = Style; in _verifyFormat()
[all …]
DNamespaceEndCommentsFixerTest.cpp25 const FormatStyle &Style = getLLVMStyle()) { in fixNamespaceEndComments() argument
29 clang::format::fixNamespaceEndComments(Style, Code, Ranges, "<stdin>"); in fixNamespaceEndComments()
38 const FormatStyle &Style = getLLVMStyle()) { in fixNamespaceEndComments() argument
41 /*Ranges=*/{1, tooling::Range(0, Code.size())}, Style); in fixNamespaceEndComments()
290 FormatStyle Style = getLLVMStyle(); in TEST_F() local
291 Style.NamespaceMacros.push_back("TESTSUITE"); in TEST_F()
301 Style)); in TEST_F()
311 Style)); in TEST_F()
320 Style)); in TEST_F()
329 Style)); in TEST_F()
[all …]
DFormatTestJS.cpp22 unsigned Length, const FormatStyle &Style) { in format() argument
28 reformat(Style, Code, Ranges, "<stdin>", &Status); in format()
38 const FormatStyle &Style = getGoogleStyle(FormatStyle::LK_JavaScript)) { in format() argument
39 return format(Code, 0, Code.size(), Style); in format()
43 FormatStyle Style = getGoogleStyle(FormatStyle::LK_JavaScript); in getGoogleJSStyleWithColumns() local
44 Style.ColumnLimit = ColumnLimit; in getGoogleJSStyleWithColumns()
45 return Style; in getGoogleJSStyleWithColumns()
50 const FormatStyle &Style = getGoogleStyle(FormatStyle::LK_JavaScript)) { in verifyFormat() argument
51 EXPECT_EQ(Code.str(), format(Code, Style)) << "Expected code is not stable"; in verifyFormat()
52 std::string Result = format(test::messUp(Code), Style); in verifyFormat()
[all …]
DFormatTestTextProto.cpp22 unsigned Length, const FormatStyle &Style) { in format() argument
26 tooling::Replacements Replaces = reformat(Style, Code, Ranges); in format()
33 static std::string format(llvm::StringRef Code, const FormatStyle &Style) { in format() argument
34 return format(Code, 0, Code.size(), Style); in format()
37 static void verifyFormat(llvm::StringRef Code, const FormatStyle &Style) { in verifyFormat() argument
38 EXPECT_EQ(Code.str(), format(Code, Style)) << "Expected code is not stable"; in verifyFormat()
39 EXPECT_EQ(Code.str(), format(test::messUp(Code), Style)); in verifyFormat()
43 FormatStyle Style = getGoogleStyle(FormatStyle::LK_TextProto); in verifyFormat() local
44 Style.ColumnLimit = 60; // To make writing tests easier. in verifyFormat()
45 verifyFormat(Code, Style); in verifyFormat()
[all …]
DSortIncludesTest.cpp52 tooling::IncludeStyle &Style = FmtStyle.IncludeStyle; member in clang::format::__anon87020ec40111::SortIncludesTest
172 Style.IncludeBlocks = tooling::IncludeStyle::IBS_Merge; in TEST_F()
182 Style.IncludeBlocks = tooling::IncludeStyle::IBS_Regroup; in TEST_F()
329 Style.IncludeBlocks = tooling::IncludeStyle::IBS_Merge; in TEST_F()
349 Style.IncludeBlocks = tooling::IncludeStyle::IBS_Merge; in TEST_F()
359 Style.IncludeBlocks = tooling::IncludeStyle::IBS_Regroup; in TEST_F()
402 Style.IncludeBlocks = tooling::IncludeStyle::IBS_Regroup; in TEST_F()
425 Style.IncludeIsMainRegex = "([-_](test|unittest))?$"; in TEST_F()
501 Style.IncludeIsMainRegex = "([-_](test|unittest))?|(Impl)?$"; in TEST_F()
534 Style.IncludeIsMainSourceRegex = "(Impl\\.hpp)|(\\.xxx)$"; in TEST_F()
[all …]
/external/llvm-project/llvm/include/llvm/Support/
DPath.h28 enum class Style { windows, posix, native }; enum
58 Style S = Style::native; ///< The path style to use.
61 friend const_iterator begin(StringRef path, Style style);
84 Style S = Style::native; ///< The path style to use.
86 friend reverse_iterator rbegin(StringRef path, Style style);
101 const_iterator begin(StringRef path, Style style = Style::native);
111 reverse_iterator rbegin(StringRef path, Style style = Style::native);
134 void remove_filename(SmallVectorImpl<char> &path, Style style = Style::native);
149 Style style = Style::native);
175 Style style = Style::native);
[all …]
DFormatProviders.h77 static bool consumeHexStyle(StringRef &Str, HexPrintStyle &Style) { in consumeHexStyle() argument
82 Style = HexPrintStyle::Lower; in consumeHexStyle()
84 Style = HexPrintStyle::Upper; in consumeHexStyle()
86 Style = HexPrintStyle::PrefixLower; in consumeHexStyle()
88 Style = HexPrintStyle::PrefixUpper; in consumeHexStyle()
92 static size_t consumeNumHexDigits(StringRef &Str, HexPrintStyle Style, in consumeNumHexDigits() argument
95 if (isPrefixedHexStyle(Style)) in consumeNumHexDigits()
131 static void format(const T &V, llvm::raw_ostream &Stream, StringRef Style) {
134 if (consumeHexStyle(Style, HS)) {
135 Digits = consumeNumHexDigits(Style, HS, 0);
[all …]
DChrono.h72 StringRef Style);
124 static std::pair<InternalRep, StringRef> consumeUnit(StringRef &Style,
127 if (Style.consume_front("ns"))
129 if (Style.consume_front("us"))
131 if (Style.consume_front("ms"))
133 if (Style.consume_front("s"))
135 if (Style.consume_front("m"))
137 if (Style.consume_front("h"))
142 static bool consumeShowUnit(StringRef &Style) {
143 if (Style.empty())
[all …]
/external/swiftshader/third_party/llvm-10.0/llvm/include/llvm/Support/
DPath.h28 enum class Style { windows, posix, native }; enum
58 Style S = Style::native; ///< The path style to use.
61 friend const_iterator begin(StringRef path, Style style);
84 Style S = Style::native; ///< The path style to use.
86 friend reverse_iterator rbegin(StringRef path, Style style);
101 const_iterator begin(StringRef path, Style style = Style::native);
111 reverse_iterator rbegin(StringRef path, Style style = Style::native);
134 void remove_filename(SmallVectorImpl<char> &path, Style style = Style::native);
149 Style style = Style::native);
181 Style style = Style::native, bool strict = false);
[all …]
DFormatProviders.h77 static bool consumeHexStyle(StringRef &Str, HexPrintStyle &Style) { in consumeHexStyle() argument
82 Style = HexPrintStyle::Lower; in consumeHexStyle()
84 Style = HexPrintStyle::Upper; in consumeHexStyle()
86 Style = HexPrintStyle::PrefixLower; in consumeHexStyle()
88 Style = HexPrintStyle::PrefixUpper; in consumeHexStyle()
92 static size_t consumeNumHexDigits(StringRef &Str, HexPrintStyle Style, in consumeNumHexDigits() argument
95 if (isPrefixedHexStyle(Style)) in consumeNumHexDigits()
131 static void format(const T &V, llvm::raw_ostream &Stream, StringRef Style) {
134 if (consumeHexStyle(Style, HS)) {
135 Digits = consumeNumHexDigits(Style, HS, 0);
[all …]
DChrono.h72 StringRef Style);
124 static std::pair<InternalRep, StringRef> consumeUnit(StringRef &Style,
127 if (Style.consume_front("ns"))
129 if (Style.consume_front("us"))
131 if (Style.consume_front("ms"))
133 if (Style.consume_front("s"))
135 if (Style.consume_front("m"))
137 if (Style.consume_front("h"))
142 static bool consumeShowUnit(StringRef &Style) {
143 if (Style.empty())
[all …]
/external/swiftshader/third_party/llvm-subzero/include/llvm/Support/
DFormatProviders.h78 static bool consumeHexStyle(StringRef &Str, HexPrintStyle &Style) { in consumeHexStyle() argument
83 Style = HexPrintStyle::Lower; in consumeHexStyle()
85 Style = HexPrintStyle::Upper; in consumeHexStyle()
87 Style = HexPrintStyle::PrefixLower; in consumeHexStyle()
89 Style = HexPrintStyle::PrefixUpper; in consumeHexStyle()
93 static size_t consumeNumHexDigits(StringRef &Str, HexPrintStyle Style, in consumeNumHexDigits() argument
96 if (isPrefixedHexStyle(Style)) in consumeNumHexDigits()
132 static void format(const T &V, llvm::raw_ostream &Stream, StringRef Style) {
135 if (consumeHexStyle(Style, HS)) {
136 Digits = consumeNumHexDigits(Style, HS, 0);
[all …]
/external/clang/lib/Format/
DFormat.cpp201 static void mapping(IO &IO, FormatStyle &Style) { in mapping()
203 IO.mapOptional("Language", Style.Language); in mapping()
212 if (getPredefinedStyle(StyleName, Style.Language, &PredefinedStyle) && in mapping()
213 Style == PredefinedStyle) { in mapping()
222 FormatStyle::LanguageKind OldLanguage = Style.Language; in mapping()
225 if (!getPredefinedStyle(BasedOnStyle, Language, &Style)) { in mapping()
229 Style.Language = OldLanguage; in mapping()
235 IO.mapOptional("DerivePointerBinding", Style.DerivePointerAlignment); in mapping()
237 Style.IndentWrappedFunctionNames); in mapping()
238 IO.mapOptional("PointerBindsToType", Style.PointerAlignment); in mapping()
[all …]
/external/llvm-project/clang/lib/Format/
DFormat.cpp401 static void mapping(IO &IO, FormatStyle &Style) { in mapping()
403 IO.mapOptional("Language", Style.Language); in mapping()
412 if (getPredefinedStyle(StyleName, Style.Language, &PredefinedStyle) && in mapping()
413 Style == PredefinedStyle) { in mapping()
422 FormatStyle::LanguageKind OldLanguage = Style.Language; in mapping()
425 if (!getPredefinedStyle(BasedOnStyle, Language, &Style)) { in mapping()
429 Style.Language = OldLanguage; in mapping()
435 IO.mapOptional("AlignEscapedNewlinesLeft", Style.AlignEscapedNewlines); in mapping()
436 IO.mapOptional("DerivePointerBinding", Style.DerivePointerAlignment); in mapping()
438 Style.IndentWrappedFunctionNames); in mapping()
[all …]
DContinuationIndenter.cpp30 static bool shouldIndentWrappedSelectorName(const FormatStyle &Style, in shouldIndentWrappedSelectorName() argument
32 return Style.IndentWrappedFunctionNames || LineType == LT_ObjCMethodDecl; in shouldIndentWrappedSelectorName()
121 const FormatStyle &Style) { in startsNextParameter() argument
124 Style.BreakConstructorInitializers == FormatStyle::BCIS_BeforeComma) in startsNextParameter()
126 if (Style.Language == FormatStyle::LK_Proto && Current.is(TT_SelectorName)) in startsNextParameter()
130 Style.BreakConstructorInitializers != in startsNextParameter()
133 Style.BreakInheritanceList != FormatStyle::BILS_BeforeComma)); in startsNextParameter()
137 const FormatStyle &Style) { in opensProtoMessageField() argument
140 return Style.Language == FormatStyle::LK_TextProto || in opensProtoMessageField()
141 (Style.Language == FormatStyle::LK_Proto && in opensProtoMessageField()
[all …]
DUnwrappedLineFormatter.cpp40 LevelIndentTracker(const FormatStyle &Style, in LevelIndentTracker() argument
43 : Style(Style), Keywords(Keywords), AdditionalIndent(AdditionalIndent) { in LevelIndentTracker()
45 IndentForLevel.push_back(Style.IndentWidth * i + AdditionalIndent); in LevelIndentTracker()
60 Indent = Line.Level * Style.IndentWidth + AdditionalIndent; in nextLine()
68 Indent = Line.Level * Style.IndentWidth + Style.ContinuationIndentWidth; in nextLine()
98 if (Style.Language == FormatStyle::LK_Java || in getIndentOffset()
99 Style.Language == FormatStyle::LK_JavaScript || Style.isCSharp()) in getIndentOffset()
105 return Style.AccessModifierOffset; in getIndentOffset()
119 return getIndent(IndentForLevel, Level - 1) + Style.IndentWidth; in getIndent()
122 const FormatStyle &Style; member in clang::format::__anon18de89fb0111::LevelIndentTracker
[all …]
DTokenAnnotator.cpp73 AnnotatingParser(const FormatStyle &Style, AnnotatedLine &Line, in AnnotatingParser() argument
75 : Style(Style), Line(Line), CurrentToken(Line.First), AutoFound(false), in AnnotatingParser()
112 if (Style.Language == FormatStyle::LK_Java && in parseAngle()
131 if (Style.Language == FormatStyle::LK_TextProto || in parseAngle()
132 (Style.Language == FormatStyle::LK_Proto && Left->Previous && in parseAngle()
141 Style.Language == FormatStyle::LK_Java) { in parseAngle()
147 !Style.isCSharp() && Style.Language != FormatStyle::LK_Proto && in parseAngle()
148 Style.Language != FormatStyle::LK_TextProto)) in parseAngle()
162 if (Style.Language == FormatStyle::LK_Proto) { in parseAngle()
226 } else if (Style.Language == FormatStyle::LK_JavaScript && in parseParens()
[all …]
/external/swiftshader/third_party/llvm-subzero/lib/Support/
DNativeFormatting.cpp53 IntegerStyle Style, bool IsNegative) { in write_unsigned_impl() argument
65 if (Len < MinDigits && Style != IntegerStyle::Number) { in write_unsigned_impl()
70 if (Style == IntegerStyle::Number) { in write_unsigned_impl()
79 IntegerStyle Style, bool IsNegative = false) { in write_unsigned() argument
82 write_unsigned_impl(S, static_cast<uint32_t>(N), MinDigits, Style, in write_unsigned()
85 write_unsigned_impl(S, N, MinDigits, Style, IsNegative); in write_unsigned()
90 IntegerStyle Style) { in write_signed() argument
96 write_unsigned(S, static_cast<UnsignedT>(N), MinDigits, Style); in write_signed()
101 write_unsigned(S, UN, MinDigits, Style, true); in write_signed()
105 IntegerStyle Style) { in write_integer() argument
[all …]
/external/swiftshader/third_party/llvm-10.0/llvm/lib/Support/
DNativeFormatting.cpp52 IntegerStyle Style, bool IsNegative) { in write_unsigned_impl() argument
64 if (Len < MinDigits && Style != IntegerStyle::Number) { in write_unsigned_impl()
69 if (Style == IntegerStyle::Number) { in write_unsigned_impl()
78 IntegerStyle Style, bool IsNegative = false) { in write_unsigned() argument
81 write_unsigned_impl(S, static_cast<uint32_t>(N), MinDigits, Style, in write_unsigned()
84 write_unsigned_impl(S, N, MinDigits, Style, IsNegative); in write_unsigned()
89 IntegerStyle Style) { in write_signed() argument
95 write_unsigned(S, static_cast<UnsignedT>(N), MinDigits, Style); in write_signed()
100 write_unsigned(S, UN, MinDigits, Style, true); in write_signed()
104 IntegerStyle Style) { in write_integer() argument
[all …]
/external/llvm-project/llvm/lib/Support/
DNativeFormatting.cpp51 IntegerStyle Style, bool IsNegative) { in write_unsigned_impl() argument
63 if (Len < MinDigits && Style != IntegerStyle::Number) { in write_unsigned_impl()
68 if (Style == IntegerStyle::Number) { in write_unsigned_impl()
77 IntegerStyle Style, bool IsNegative = false) { in write_unsigned() argument
80 write_unsigned_impl(S, static_cast<uint32_t>(N), MinDigits, Style, in write_unsigned()
83 write_unsigned_impl(S, N, MinDigits, Style, IsNegative); in write_unsigned()
88 IntegerStyle Style) { in write_signed() argument
94 write_unsigned(S, static_cast<UnsignedT>(N), MinDigits, Style); in write_signed()
99 write_unsigned(S, UN, MinDigits, Style, true); in write_signed()
103 IntegerStyle Style) { in write_integer() argument
[all …]
/external/llvm-project/llvm/tools/llvm-pdbutil/
DFormatUtil.cpp175 #define PUSH_CHARACTERISTIC_FLAG(Enum, TheOpt, Value, Style, Descriptive) \ argument
177 ((Style == CharacteristicStyle::HeaderDefinition) ? #TheOpt \
180 #define PUSH_MASKED_CHARACTERISTIC_FLAG(Enum, Mask, TheOpt, Value, Style, \ argument
183 ((Style == CharacteristicStyle::HeaderDefinition) \
191 CharacteristicStyle Style) { in formatSectionCharacteristics() argument
198 PUSH_CHARACTERISTIC_FLAG(SC, IMAGE_SCN_TYPE_NOLOAD, C, Style, "noload"); in formatSectionCharacteristics()
199 PUSH_CHARACTERISTIC_FLAG(SC, IMAGE_SCN_TYPE_NO_PAD, C, Style, "no padding"); in formatSectionCharacteristics()
200 PUSH_CHARACTERISTIC_FLAG(SC, IMAGE_SCN_CNT_CODE, C, Style, "code"); in formatSectionCharacteristics()
201 PUSH_CHARACTERISTIC_FLAG(SC, IMAGE_SCN_CNT_INITIALIZED_DATA, C, Style, in formatSectionCharacteristics()
203 PUSH_CHARACTERISTIC_FLAG(SC, IMAGE_SCN_CNT_UNINITIALIZED_DATA, C, Style, in formatSectionCharacteristics()
[all …]
/external/clang/unittests/Format/
DFormatTest.cpp37 const FormatStyle &Style = getLLVMStyle(), in format() argument
44 reformat(Style, Code, Ranges, "<stdin>", &IncompleteFormat); in format()
57 FormatStyle Style = getLLVMStyle(); in getLLVMStyleWithColumns() local
58 Style.ColumnLimit = ColumnLimit; in getLLVMStyleWithColumns()
59 return Style; in getLLVMStyleWithColumns()
63 FormatStyle Style = getGoogleStyle(); in getGoogleStyleWithColumns() local
64 Style.ColumnLimit = ColumnLimit; in getGoogleStyleWithColumns()
65 return Style; in getGoogleStyleWithColumns()
69 const FormatStyle &Style = getLLVMStyle()) { in verifyFormat() argument
70 EXPECT_EQ(Code.str(), format(test::messUp(Code), Style)); in verifyFormat()
[all …]
DFormatTestJS.cpp23 unsigned Length, const FormatStyle &Style) { in format() argument
29 reformat(Style, Code, Ranges, "<stdin>", &IncompleteFormat); in format()
39 const FormatStyle &Style = getGoogleStyle(FormatStyle::LK_JavaScript)) { in format() argument
40 return format(Code, 0, Code.size(), Style); in format()
44 FormatStyle Style = getGoogleStyle(FormatStyle::LK_JavaScript); in getGoogleJSStyleWithColumns() local
45 Style.ColumnLimit = ColumnLimit; in getGoogleJSStyleWithColumns()
46 return Style; in getGoogleJSStyleWithColumns()
51 const FormatStyle &Style = getGoogleStyle(FormatStyle::LK_JavaScript)) { in verifyFormat() argument
52 std::string Result = format(test::messUp(Code), Style); in verifyFormat()
59 const FormatStyle &Style = getGoogleStyle(FormatStyle::LK_JavaScript)) { in verifyFormat() argument
[all …]

12345678910>>...33