/external/llvm-project/clang/lib/Format/ |
D | FormatTokenLexer.cpp | 182 At->TokenText = StringRef(At->TokenText.begin(), in tryMergeNSStringLiteral() 183 String->TokenText.end() - At->TokenText.begin()); in tryMergeNSStringLiteral() 200 Hash->TokenText = in tryMergeJSPrivateIdentifier() 201 StringRef(Hash->TokenText.begin(), in tryMergeJSPrivateIdentifier() 202 Identifier->TokenText.end() - Hash->TokenText.begin()); in tryMergeJSPrivateIdentifier() 229 (CSharpInterpolatedString->TokenText.startswith(R"($")") || in tryMergeCSharpStringLiteral() 233 auto TokenTextSize = CSharpInterpolatedString->TokenText.size(); in tryMergeCSharpStringLiteral() 235 char C = CSharpInterpolatedString->TokenText[Index]; in tryMergeCSharpStringLiteral() 239 CSharpInterpolatedString->TokenText[Index + 1] == '{') { in tryMergeCSharpStringLiteral() 247 CSharpInterpolatedString->TokenText[Index + 1] == '}') { in tryMergeCSharpStringLiteral() [all …]
|
D | BreakableToken.cpp | 220 StringRef Content = Token.TokenText.substr(2).ltrim(); in switchesFormatting() 272 assert(Tok.TokenText.startswith(Prefix) && Tok.TokenText.endswith(Postfix)); in BreakableStringLiteral() 273 Line = Tok.TokenText.substr( in BreakableStringLiteral() 274 Prefix.size(), Tok.TokenText.size() - Prefix.size() - Postfix.size()); in BreakableStringLiteral() 323 Text.data() - tokenAt(LineIndex).TokenText.data() + Split.first; in compressWhitespace() 374 StringRef TokenText(Tok.TokenText); in BreakableBlockComment() local 375 assert(TokenText.startswith("/*") && TokenText.endswith("*/")); in BreakableBlockComment() 376 TokenText.substr(2, TokenText.size() - 4) in BreakableBlockComment() 618 Text.data() - tokenAt(LineIndex).TokenText.data() + Split.first; in insertBreak() 664 tokenAt(LineIndex).TokenText.data(); in reflow() [all …]
|
D | MacroExpander.cpp | 61 Def.Name = Current->TokenText; in parse() 80 Def.ArgMap[Def.Params.back()->TokenText] = Def.Params.size() - 1; in parseParams() 160 assert(defined(ID->TokenText)); in expand() 162 const Definition &Def = Definitions.find(ID->TokenText)->second; in expand() 178 if (!Tok->is(tok::identifier) || ExpandedArgs.contains(Tok->TokenText)) in expand() 180 ExpandedArgs.insert(Tok->TokenText); in expand() 181 auto I = Def.ArgMap.find(Tok->TokenText); in expand()
|
D | NamespaceEndCommentsFixer.cpp | 43 name += Tok->TokenText; in computeName() 59 name += Tok->TokenText; in computeName() 71 text += NamespaceTok->TokenText; in computeEndCommentText() 106 NamespaceMacroCommentPattern.match(Comment->TokenText, &Groups)) { in validEndComment() 109 if (NamespaceTokenText != NamespaceTok->TokenText) in validEndComment() 112 !NamespaceCommentPattern.match(Comment->TokenText, &Groups)) { in validEndComment() 137 if (!CommentPattern.match(Comment->Next->TokenText, &Groups)) { in validEndComment() 195 return NamespaceTok ? NamespaceTok->TokenText : StringRef(); in getNamespaceTokenText() 250 NamespaceTokenText = NamespaceTok->TokenText; in analyze()
|
D | SortJavaScriptImports.cpp | 342 Current->TokenText.substr(1, Current->TokenText.size() - 2); in parseModuleReference() 356 Current->TokenText.substr(1, Current->TokenText.size() - 2); in parseModuleReference() 389 Reference.Prefix = Current->TokenText; in parseStarBinding() 416 Symbol.Symbol = Current->TokenText; in parseNamedBindings() 426 Symbol.Alias = Current->TokenText; in parseNamedBindings()
|
D | ContinuationIndenter.cpp | 149 static llvm::Optional<StringRef> getRawStringDelimiter(StringRef TokenText) { in getRawStringDelimiter() argument 150 if (TokenText.size() < 5 // The smallest raw string possible is 'R"()"'. in getRawStringDelimiter() 151 || !TokenText.startswith("R\"") || !TokenText.endswith("\"")) in getRawStringDelimiter() 157 size_t LParenPos = TokenText.substr(0, 19).find_first_of('('); in getRawStringDelimiter() 160 StringRef Delimiter = TokenText.substr(2, LParenPos - 2); in getRawStringDelimiter() 163 size_t RParenPos = TokenText.size() - Delimiter.size() - 2; in getRawStringDelimiter() 164 if (TokenText[RParenPos] != ')') in getRawStringDelimiter() 166 if (!TokenText.substr(RParenPos + 1).startswith(Delimiter)) in getRawStringDelimiter() 511 ((Previous.is(tok::identifier) && Previous.TokenText == "endl") || in mustBreak() 512 (Previous.Tok.isLiteral() && (Previous.TokenText.endswith("\\n\"") || in mustBreak() [all …]
|
D | UnwrappedLineParser.cpp | 61 return FormatTok.is(tok::comment) && !FormatTok.TokenText.startswith("/*"); in isLineComment() 657 if (I->Tok->TokenText != "goog") in isGoogScope() 663 if (I->Tok->TokenText != "scope") in isGoogScope() 809 if (!IfDef && (FormatTok->is(tok::kw_false) || FormatTok->TokenText == "0")) in parsePPIf() 811 if (IfDef && !IfNDef && FormatTok->TokenText == "SWIG") in parsePPIf() 872 IncludeGuardToken->TokenText == FormatTok->TokenText) { in parsePPDefine() 1004 Previous->is(TT_TemplateString) && Previous->TokenText.endswith("${"); in readTokenWithJavaScriptASI() 1019 Next->is(TT_TemplateString) && Next->TokenText.startswith("}"); in readTokenWithJavaScriptASI() 1435 StringRef Text = FormatTok->TokenText; in parseStructuralElement() 2616 FormatTok->TokenText != FormatTok->TokenText.upper(); in parseRecord() [all …]
|
D | TokenAnnotator.cpp | 1155 !CurrentToken->TokenText.startswith("//")) in parseIncludeDirective() 1348 return Tok.TokenText == "goog" && Tok.Next && Tok.Next->is(tok::period) && in isClosureImportStatement() 1350 (Tok.Next->Next->TokenText == "module" || in isClosureImportStatement() 1351 Tok.Next->Next->TokenText == "provide" || in isClosureImportStatement() 1352 Tok.Next->Next->TokenText == "require" || in isClosureImportStatement() 1353 Tok.Next->Next->TokenText == "requireType" || in isClosureImportStatement() 1354 Tok.Next->Next->TokenText == "forwardDeclare") && in isClosureImportStatement() 1553 LeadingIdentifier->TokenText == Current.Next->TokenText); in isDeductionGuide() 1566 if (CurrentToken->TokenText == "??") { in determineTokenType() 1570 if (CurrentToken->TokenText == "?.") { in determineTokenType() [all …]
|
D | UnwrappedLineFormatter.cpp | 153 return NamespaceToken ? NamespaceToken->TokenText : StringRef(); in getNamespaceTokenText() 161 return NamespaceToken ? NamespaceToken->TokenText : StringRef(); in getMatchingNamespaceTokenText() 267 nsToken->TokenText == getNamespaceTokenText(I[i + 1]) && in tryFitMultipleLinesInOne() 283 nsToken->TokenText == in tryFitMultipleLinesInOne() 723 llvm::dbgs() << (P.Tok ? P.Tok->TokenText : "F") << "|" << P.Indent << "|" in printLineState() 726 llvm::dbgs() << State.NextToken->TokenText << "\n"; in printLineState()
|
D | FormatToken.h | 227 StringRef TokenText; member 527 if (is(TT_TemplateString) && TokenText.endswith("${")) in opensScope() 537 if (is(TT_TemplateString) && TokenText.startswith("}")) in closesScope() 606 StringRef Content = TokenText; in isLabelString()
|
D | AffectedRangeManager.cpp | 79 End = End.getLocWithOffset(Last.TokenText.size()); in affectsTokenRange()
|
D | UsingDeclarationsSorter.cpp | 102 Label.append(Tok->TokenText.str()); in computeUsingDeclarationLabel()
|
D | Format.cpp | 1458 StringRef Input = FormatTok->TokenText; in requoteJSStringLiteral() 1693 Prev->Tok.getLocation().getLocWithOffset(Prev->TokenText.size()); in insertTrailingCommas() 2044 FormatTok->TokenText)) || in guessIsObjC() 2055 << " token: " << FormatTok->TokenText << " token type: " in guessIsObjC()
|
/external/clang/lib/Format/ |
D | FormatTokenLexer.cpp | 108 First[0]->TokenText = "<<"; in tryMergeLessLess() 129 AddLength += First[i]->TokenText.size(); in tryMergeTokens() 132 First[0]->TokenText = StringRef(First[0]->TokenText.data(), in tryMergeTokens() 133 First[0]->TokenText.size() + AddLength); in tryMergeTokens() 196 const char *RegexBegin = Offset - RegexToken->TokenText.size(); in tryParseJSRegexLiteral() 225 RegexToken->TokenText = StringRef(RegexBegin, Offset - RegexBegin); in tryParseJSRegexLiteral() 226 RegexToken->ColumnWidth = RegexToken->TokenText.size(); in tryParseJSRegexLiteral() 233 if (!BacktickToken->is(tok::unknown) || BacktickToken->TokenText != "`") in tryParseTemplateString() 238 const char *TmplBegin = Offset - BacktickToken->TokenText.size(); // at "`" in tryParseTemplateString() 247 BacktickToken->TokenText = LiteralText; in tryParseTemplateString() [all …]
|
D | BreakableToken.cpp | 150 assert(Tok.TokenText.endswith(Postfix)); in BreakableSingleLineToken() 151 Line = Tok.TokenText.substr( in BreakableSingleLineToken() 152 Prefix.size(), Tok.TokenText.size() - Prefix.size() - Postfix.size()); in BreakableSingleLineToken() 204 getLineCommentIndentPrefix(Token.TokenText), "", in BreakableLineComment() 207 if (Token.TokenText.size() > Prefix.size() && in BreakableLineComment() 208 isAlphanumeric(Token.TokenText[Prefix.size()])) { in BreakableLineComment() 257 StringRef TokenText(Token.TokenText); in BreakableBlockComment() local 258 assert(TokenText.startswith("/*") && TokenText.endswith("*/")); in BreakableBlockComment() 259 TokenText.substr(2, TokenText.size() - 4).split(Lines, "\n"); in BreakableBlockComment() 397 Text.data() - Tok.TokenText.data() + Split.first; in insertBreak() [all …]
|
D | SortJavaScriptImports.cpp | 339 Current->TokenText.substr(1, Current->TokenText.size() - 2); in parseModuleReference() 354 Current->TokenText.substr(1, Current->TokenText.size() - 2); in parseModuleReference() 387 Reference.Prefix = Current->TokenText; in parseStarBinding() 405 Symbol.Symbol = Current->TokenText; in parseNamedBindings() 415 Symbol.Alias = Current->TokenText; in parseNamedBindings()
|
D | TokenAnnotator.cpp | 843 return Tok.TokenText == "goog" && Tok.Next && Tok.Next->is(tok::period) && in isClosureImportStatement() 844 Tok.Next->Next && (Tok.Next->Next->TokenText == "module" || in isClosureImportStatement() 845 Tok.Next->Next->TokenText == "provide" || in isClosureImportStatement() 846 Tok.Next->Next->TokenText == "require" || in isClosureImportStatement() 847 Tok.Next->Next->TokenText == "setTestOnly" || in isClosureImportStatement() 848 Tok.Next->Next->TokenText == "forwardDeclare") && in isClosureImportStatement() 1023 if (Current.TokenText.startswith("/*")) { in determineTokenType() 1024 if (Current.TokenText.endswith("*/")) in determineTokenType() 1042 BeforeParen->TokenText == BeforeParen->TokenText.upper() && in determineTokenType() 1902 bool is_short_annotation = Right.TokenText.size() < 10; in splitPenalty() [all …]
|
D | ContinuationIndenter.cpp | 269 ((Previous.is(tok::identifier) && Previous.TokenText == "endl") || in mustBreak() 270 (Previous.Tok.isLiteral() && (Previous.TokenText.endswith("\\n\"") || in mustBreak() 271 Previous.TokenText == "\'\\n\'")))) in mustBreak() 1108 StringRef Text = Current.TokenText; in breakProtrudingToken() 1135 CommentPragmasRegex.match(Current.TokenText.substr(2))) in breakProtrudingToken() 1144 CommentPragmasRegex.match(Current.TokenText.substr(2))) in breakProtrudingToken() 1242 if (Current.TokenText.startswith("R\"")) in nextIsMultilineString()
|
D | AffectedRangeManager.cpp | 79 End = End.getLocWithOffset(Last.TokenText.size()); in affectsTokenRange()
|
D | UnwrappedLineParser.cpp | 459 if (I->Tok->TokenText != "goog") in isGoogScope() 465 if (I->Tok->TokenText != "scope") in isGoogScope() 1058 StringRef Text = FormatTok->TokenText; in parseStructuralElement() 1822 FormatTok->TokenText != FormatTok->TokenText.upper(); in parseRecord()
|
D | FormatToken.h | 161 StringRef TokenText; member
|
/external/llvm-project/clang/unittests/Format/ |
D | TestLexer.h | 35 Stream << "(" << Tok.Tok.getName() << ", \"" << Tok.TokenText.str() << "\" , " 56 return (R + Tok->TokenText).str(); in text()
|
D | MacroExpanderTest.cpp | 54 " / " + Tokens[I]->TokenText) in expectAttributes()
|
/external/llvm-project/clang/lib/Frontend/ |
D | PrintPreprocessedOutput.cpp | 341 const std::string TokenText = PP.getSpelling(IncludeTok); in InclusionDirective() local 342 assert(!TokenText.empty()); in InclusionDirective() 343 OS << "#" << TokenText << " " in InclusionDirective()
|
/external/llvm-project/clang/lib/ASTMatchers/ |
D | ASTMatchersInternal.cpp | 676 StringRef TokenText = Lexer::getSpelling(SM.getSpellingLoc(Loc), Buffer, SM, in isTokenAtLoc() local 678 return !Invalid && Text == TokenText; in isTokenAtLoc()
|