Home
last modified time | relevance | path

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

12345678

/netbsd-src/external/apache2/llvm/dist/llvm/include/llvm/Support/
H A 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 …]
H A 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 …]
H A 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 …]
H A DNativeFormatting.h24 size_t getDefaultPrecision(FloatStyle Style);
29 IntegerStyle Style);
30 void write_integer(raw_ostream &S, int N, size_t MinDigits, IntegerStyle Style);
32 IntegerStyle Style);
34 IntegerStyle Style);
36 IntegerStyle Style);
38 IntegerStyle Style);
40 void write_hex(raw_ostream &S, uint64_t N, HexPrintStyle Style,
42 void write_double(raw_ostream &S, double D, FloatStyle Style,
H A DFormatAdapters.h37 void format(llvm::raw_ostream &Stream, StringRef Style) override { in format() argument
39 FmtAlign(Adapter, Where, Amount, Fill).format(Stream, Style); in format()
51 void format(llvm::raw_ostream &Stream, StringRef Style) override { in format() argument
54 Adapter.format(Stream, Style); in format()
66 void format(llvm::raw_ostream &Stream, StringRef Style) override { in format() argument
69 Adapter.format(Stream, Style); in format()
79 void format(llvm::raw_ostream &Stream, StringRef Style) override { in format() argument
/netbsd-src/external/apache2/llvm/dist/clang/lib/Format/
H A DFormat.cpp464 static void mapping(IO &IO, FormatStyle &Style) { in mapping()
466 IO.mapOptional("Language", Style.Language); in mapping()
475 if (getPredefinedStyle(StyleName, Style.Language, &PredefinedStyle) && in mapping()
476 Style == PredefinedStyle) { in mapping()
485 FormatStyle::LanguageKind OldLanguage = Style.Language; in mapping()
488 if (!getPredefinedStyle(BasedOnStyle, Language, &Style)) { in mapping()
492 Style.Language = OldLanguage; in mapping()
498 IO.mapOptional("AlignEscapedNewlinesLeft", Style.AlignEscapedNewlines); in mapping()
499 IO.mapOptional("DerivePointerBinding", Style.DerivePointerAlignment); in mapping()
501 Style.IndentWrappedFunctionNames); in mapping()
[all …]
H A 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 …]
H A 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()
108 return Style.IndentAccessModifiers ? -Style.IndentWidth in getIndentOffset()
109 : Style.AccessModifierOffset; in getIndentOffset()
124 return getIndent(IndentForLevel, Level - 1) + Style.IndentWidth; in getIndent()
[all …]
H A DUnwrappedLineParser.cpp175 const FormatStyle &Style, unsigned &LineLevel) in CompoundStatementIndenter() argument
177 Style.BraceWrapping.AfterControlStatement, in CompoundStatementIndenter()
178 Style.BraceWrapping.IndentBraces) {} in CompoundStatementIndenter()
225 UnwrappedLineParser::UnwrappedLineParser(const FormatStyle &Style, in UnwrappedLineParser() argument
231 CurrentLines(&Lines), Style(Style), Keywords(Keywords), in UnwrappedLineParser()
232 CommentPragmasRegex(Style.CommentPragmas), Tokens(nullptr), in UnwrappedLineParser()
234 IncludeGuard(Style.IndentPPDirectives == FormatStyle::PPDIS_None in UnwrappedLineParser()
241 IncludeGuard = Style.IndentPPDirectives == FormatStyle::PPDIS_None in reset()
303 !Line->InPPDirective && Style.Language != FormatStyle::LK_JavaScript; in parseFile()
306 if (Style.Language == FormatStyle::LK_TextProto) in parseFile()
[all …]
H A 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()
138 if (Style.Language == FormatStyle::LK_TextProto || in parseAngle()
139 (Style.Language == FormatStyle::LK_Proto && Left->Previous && in parseAngle()
148 Style.Language == FormatStyle::LK_Java) { in parseAngle()
154 !Style.isCSharp() && Style.Language != FormatStyle::LK_Proto && in parseAngle()
155 Style.Language != FormatStyle::LK_TextProto)) in parseAngle()
169 if (Style.Language == FormatStyle::LK_Proto) { in parseAngle()
233 } else if (Style.Language == FormatStyle::LK_JavaScript && in parseParens()
[all …]
H A DWhitespaceManager.cpp403 const FormatStyle &Style, F &&Matches, in AlignTokens() argument
490 unsigned StoppedAt = AlignTokens(Style, Matches, Changes, i, ACS); in AlignTokens()
521 unsigned ChangeMaxColumn = Style.ColumnLimit - LineLengthAfter; in AlignTokens()
585 if (Style.AlignConsecutiveMacros == FormatStyle::ACS_None) in alignConsecutiveMacros()
638 (Style.AlignConsecutiveMacros != FormatStyle::ACS_AcrossEmptyLines) && in alignConsecutiveMacros()
639 (Style.AlignConsecutiveMacros != in alignConsecutiveMacros()
646 !(LineIsComment && ((Style.AlignConsecutiveMacros == in alignConsecutiveMacros()
648 (Style.AlignConsecutiveMacros == in alignConsecutiveMacros()
676 unsigned ChangeMaxColumn = Style.ColumnLimit - LineLengthAfter; in alignConsecutiveMacros()
688 if (Style.AlignConsecutiveAssignments == FormatStyle::ACS_None) in alignConsecutiveAssignments()
[all …]
H A DFormatTokenLexer.cpp27 const FormatStyle &Style, encoding::Encoding Encoding, in FormatTokenLexer() argument
32 Style(Style), IdentTable(IdentTable), Keywords(IdentTable),
34 FormattingDisabled(false), MacroBlockBeginRegex(Style.MacroBlockBegin),
35 MacroBlockEndRegex(Style.MacroBlockEnd) {
37 getFormattingLangOpts(Style)));
40 for (const std::string &ForEachMacro : Style.ForEachMacros)
42 for (const std::string &AttributeMacro : Style.AttributeMacros)
44 for (const std::string &StatementMacro : Style.StatementMacros)
46 for (const std::string &TypenameMacro : Style.TypenameMacros)
48 for (const std::string &NamespaceMacro : Style.NamespaceMacros)
[all …]
H A DBreakableToken.cpp43 const FormatStyle &Style) { in getLineCommentIndentPrefix() argument
49 if (Style.Language == FormatStyle::LK_TextProto) in getLineCommentIndentPrefix()
70 encoding::Encoding Encoding, const FormatStyle &Style, in getCommentSplit() argument
94 if (Style.Language == FormatStyle::LK_JavaScript) { in getCommentSplit()
113 if (Style.isCpp()) { in getCommentSplit()
130 if (Style.Language == FormatStyle::LK_JavaScript && in getCommentSplit()
259 StartColumn, Style.TabWidth, Encoding); in getRemainingLength()
270 encoding::Encoding Encoding, const FormatStyle &Style) in BreakableStringLiteral() argument
271 : BreakableToken(Tok, InPPDirective, Encoding, Style), in BreakableStringLiteral()
283 ColumnLimit - Postfix.size(), Style.TabWidth, Encoding); in getSplit()
[all …]
H A DTokenAnalyzer.cpp51 TokenAnalyzer::TokenAnalyzer(const Environment &Env, const FormatStyle &Style) in TokenAnalyzer() argument
52 : Style(Style), Env(Env), in TokenAnalyzer()
61 LLVM_DEBUG(llvm::dbgs() << "Language: " << getLanguageName(Style.Language) in TokenAnalyzer()
68 IdentifierTable IdentTable(getFormattingLangOpts(Style)); in process()
70 Env.getFirstStartColumn(), Style, Encoding, Allocator, in process()
75 UnwrappedLineParser Parser(Style, Lex.getKeywords(), in process()
84 TokenAnnotator Annotator(Style, Lex.getKeywords()); in process()
H A DBreakableToken.h235 encoding::Encoding Encoding, const FormatStyle &Style) in BreakableToken() argument
237 Style(Style) {} in BreakableToken()
242 const FormatStyle &Style; variable
254 encoding::Encoding Encoding, const FormatStyle &Style);
294 const FormatStyle &Style);
362 const FormatStyle &Style, bool UseCRLF);
440 const FormatStyle &Style);
H A DUnwrappedLineFormatter.h32 const FormatStyle &Style, in UnwrappedLineFormatter() argument
36 : Indenter(Indenter), Whitespaces(Whitespaces), Style(Style), in UnwrappedLineFormatter()
67 const FormatStyle &Style; variable
H A DFormatToken.cpp96 Style.ColumnLimit - State.Column + State.NextToken->Previous->ColumnWidth; in formatAfterToken()
162 if (Style.Cpp11BracedListStyle && !Style.BinPackArguments && in precomputeFormattingInfos()
173 if (Style.AlignAfterOpenBracket == FormatStyle::BAS_DontAlign) in precomputeFormattingInfos()
201 if (Style.Cpp11BracedListStyle && in precomputeFormattingInfos()
239 unsigned MaxItems = Style.ColumnLimit / 3; in precomputeFormattingInfos()
284 if (Format.TotalWidth > Style.ColumnLimit && Columns > 1) in precomputeFormattingInfos()
/netbsd-src/external/apache2/llvm/dist/llvm/lib/Support/
H A 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 …]
H A DPath.cpp37 using llvm::sys::path::Style;
39 inline Style real_style(Style style) { in real_style()
41 return (style == Style::posix) ? Style::posix : Style::windows; in real_style()
43 return (style == Style::windows) ? Style::windows : Style::posix; in real_style()
47 inline const char *separators(Style style) { in separators()
48 if (real_style(style) == Style::windows) in separators()
53 inline char preferred_separator(Style style) { in preferred_separator()
54 if (real_style(style) == Style::windows) in preferred_separator()
59 StringRef find_first_component(StringRef path, Style style) { in find_first_component()
69 if (real_style(style) == Style::windows) { in find_first_component()
[all …]
H A DChrono.cpp54 StringRef Style) { in format() argument
60 if (Style.empty()) Style = "%Y-%m-%d %H:%M:%S.%N"; in format()
63 for (unsigned I = 0; I < Style.size(); ++I) { in format()
64 if (Style[I] == '%' && Style.size() > I + 1) switch (Style[I + 1]) { in format()
85 FStream << Style[I]; in format()
/netbsd-src/external/apache2/llvm/dist/llvm/tools/llvm-pdbutil/
H A DFormatUtil.cpp176 #define PUSH_CHARACTERISTIC_FLAG(Enum, TheOpt, Value, Style, Descriptive) \ argument
178 ((Style == CharacteristicStyle::HeaderDefinition) ? #TheOpt \
181 #define PUSH_MASKED_CHARACTERISTIC_FLAG(Enum, Mask, TheOpt, Value, Style, \ argument
184 ((Style == CharacteristicStyle::HeaderDefinition) \
192 CharacteristicStyle Style) { in formatSectionCharacteristics() argument
199 PUSH_CHARACTERISTIC_FLAG(SC, IMAGE_SCN_TYPE_NOLOAD, C, Style, "noload"); in formatSectionCharacteristics()
200 PUSH_CHARACTERISTIC_FLAG(SC, IMAGE_SCN_TYPE_NO_PAD, C, Style, "no padding"); in formatSectionCharacteristics()
201 PUSH_CHARACTERISTIC_FLAG(SC, IMAGE_SCN_CNT_CODE, C, Style, "code"); in formatSectionCharacteristics()
202 PUSH_CHARACTERISTIC_FLAG(SC, IMAGE_SCN_CNT_INITIALIZED_DATA, C, Style, in formatSectionCharacteristics()
204 PUSH_CHARACTERISTIC_FLAG(SC, IMAGE_SCN_CNT_UNINITIALIZED_DATA, C, Style, in formatSectionCharacteristics()
[all …]
/netbsd-src/external/apache2/llvm/dist/clang/lib/Tooling/Inclusions/
H A DHeaderIncludes.cpp41 StringRef FileName, StringRef Code, const IncludeStyle &Style, in getOffsetAfterTokenSequence() argument
83 const IncludeStyle &Style) { in getOffsetAfterHeaderGuardsAndComments() argument
91 FileName, Code, Style, in getOffsetAfterHeaderGuardsAndComments()
159 const IncludeStyle &Style) { in getMaxHeaderInsertionOffset() argument
161 FileName, Code, Style, in getMaxHeaderInsertionOffset()
190 IncludeCategoryManager::IncludeCategoryManager(const IncludeStyle &Style, in IncludeCategoryManager() argument
192 : Style(Style), FileName(FileName) { in IncludeCategoryManager()
193 for (const auto &Category : Style.IncludeCategories) { in IncludeCategoryManager()
202 if (!Style.IncludeIsMainSourceRegex.empty()) { in IncludeCategoryManager()
203 llvm::Regex MainFileRegex(Style.IncludeIsMainSourceRegex); in IncludeCategoryManager()
[all …]
/netbsd-src/external/apache2/llvm/dist/clang/include/clang/Format/
H A DFormat.h3407 void Add(FormatStyle Style);
3424 parseConfiguration(llvm::MemoryBufferRef Config, FormatStyle *Style,
3471 FormatStyle *Style);
3488 parseConfiguration(llvm::MemoryBufferRef Config, FormatStyle *Style,
3494 inline std::error_code parseConfiguration(StringRef Config, FormatStyle *Style,
3496 return parseConfiguration(llvm::MemoryBufferRef(Config, "YAML"), Style,
3501 std::string configurationAsText(const FormatStyle &Style);
3505 tooling::Replacements sortIncludes(const FormatStyle &Style, StringRef Code,
3515 const FormatStyle &Style);
3532 const FormatStyle &Style);
[all …]
/netbsd-src/external/apache2/llvm/dist/llvm/tools/llvm-symbolizer/
H A Dllvm-symbolizer.cpp149 bool IsAddr2Line, OutputStyle Style, in symbolizeInput() argument
174 } else if (Style == OutputStyle::GNU) { in symbolizeInput()
318 auto Style = IsAddr2Line ? OutputStyle::GNU : OutputStyle::LLVM; in main() local
321 Style = OutputStyle::GNU; in main()
323 Style = OutputStyle::JSON; in main()
325 Style = OutputStyle::LLVM; in main()
330 if (Style == OutputStyle::GNU) in main()
332 else if (Style == OutputStyle::JSON) in main()
347 symbolizeInput(Args, AdjustVMA, IsAddr2Line, Style, StrippedInputString, in main()
354 symbolizeInput(Args, AdjustVMA, IsAddr2Line, Style, Address, Symbolizer, in main()
/netbsd-src/external/apache2/llvm/dist/clang/tools/clang-format/fuzzer/
H A DClangFormatFuzzer.cpp20 auto Style = getGoogleStyle(clang::format::FormatStyle::LK_Cpp); in LLVMFuzzerTestOneInput() local
21 Style.ColumnLimit = 60; in LLVMFuzzerTestOneInput()
22 auto Replaces = reformat(Style, s, clang::tooling::Range(0, s.size())); in LLVMFuzzerTestOneInput()

12345678