| /llvm-project-15.0.7/clang/lib/Format/ |
| H A D | FormatTokenLexer.cpp | 206 At->TokenText = StringRef(At->TokenText.begin(), in tryMergeNSStringLiteral() 224 Hash->TokenText = in tryMergeJSPrivateIdentifier() 269 At->TokenText = StringRef(At->TokenText.begin(), in tryMergeCSharpStringLiteral() 314 At->TokenText = StringRef(At->TokenText.begin(), in tryMergeCSharpKeywordVariables() 352 For->TokenText = StringRef(For->TokenText.begin(), in tryMergeForEach() 424 First[0]->TokenText = StringRef(First[0]->TokenText.data(), in tryMergeTokens() 590 auto &TokenText = CSharpStringLiteral->TokenText; in handleCSharpVerbatimAndInterpolatedStrings() local 1034 FormatTok->TokenText = FormatTok->TokenText.rtrim(" \t\v\f"); 1053 FormatTok->TokenText = FormatTok->TokenText.substr(0, 1); 1058 FormatTok->TokenText = FormatTok->TokenText.substr(0, 1); [all …]
|
| H A D | BreakableToken.cpp | 222 StringRef Content = Token.TokenText.substr(2).ltrim(); in switchesFormatting() 274 assert(Tok.TokenText.startswith(Prefix) && Tok.TokenText.endswith(Postfix)); in BreakableStringLiteral() 275 Line = Tok.TokenText.substr( in BreakableStringLiteral() 376 StringRef TokenText(Tok.TokenText); in BreakableBlockComment() local 377 assert(TokenText.startswith("/*") && TokenText.endswith("*/")); in BreakableBlockComment() 378 TokenText.substr(2, TokenText.size() - 4) in BreakableBlockComment() 766 StringRef TokenText(CurrentTok->TokenText); in BreakableLineCommentSection() local 767 assert((TokenText.startswith("//") || TokenText.startswith("#")) && in BreakableLineCommentSection() 770 TokenText.split(Lines, "\n"); in BreakableLineCommentSection() 804 if (FirstCommentChar == '#' && !TokenText.startswith("#")) in BreakableLineCommentSection() [all …]
|
| H A D | NamespaceEndCommentsFixer.cpp | 74 name += Tok->TokenText; in computeName() 90 FirstNSName += FirstNSTok->TokenText; in computeName() 121 name += FirstNSTok->TokenText; in computeName() 136 name += FirstNSTok->TokenText; in computeName() 147 text += NamespaceTok->TokenText; in computeEndCommentText() 182 NamespaceMacroCommentPattern.match(Comment->TokenText, &Groups)) { in validEndComment() 185 if (NamespaceTokenText != NamespaceTok->TokenText) in validEndComment() 188 !NamespaceCommentPattern.match(Comment->TokenText, &Groups)) { in validEndComment() 213 if (!CommentPattern.match(Comment->Next->TokenText, &Groups)) in validEndComment() 274 return NamespaceTok ? NamespaceTok->TokenText : StringRef(); in getNamespaceTokenText() [all …]
|
| H A D | MacroExpander.cpp | 60 Def.Name = Current->TokenText; in parse() 79 Def.ArgMap[Def.Params.back()->TokenText] = Def.Params.size() - 1; in parseParams() 158 assert(defined(ID->TokenText)); in expand() 160 const Definition &Def = Definitions.find(ID->TokenText)->second; in expand() 176 if (!Tok->is(tok::identifier) || ExpandedArgs.contains(Tok->TokenText)) in expand() 178 ExpandedArgs.insert(Tok->TokenText); in expand() 179 auto I = Def.ArgMap.find(Tok->TokenText); in expand()
|
| H A D | MacroCallReconstructor.cpp | 77 llvm::dbgs() << "MCR: Token: " << Token->TokenText << ", Parent: " in add() 78 << (ExpandedParent ? ExpandedParent->TokenText : "<null>") in add() 141 << (Parent ? Parent->TokenText : "<null>") << "\n"); in prepareParent() 156 << MacroCallStructure.back().MacroCallLParen->TokenText in prepareParent() 158 << (OpenMacroParent ? OpenMacroParent->TokenText : "<null>") in prepareParent() 338 llvm::dbgs() << "At token: " << Token->TokenText << "\n"; in endReconstruction() 377 llvm::dbgs() << (P.first ? P.first->TokenText : "<null>"); in debugParentMap() 381 llvm::dbgs() << " -> " << (I->second ? I->second->TokenText : "<null>"); in debugParentMap() 504 LLVM_DEBUG(llvm::dbgs() << "-> " << Token->TokenText << "\n"); in appendToken() 538 llvm::dbgs() << N->Tok->TokenText << " "; in debug() [all …]
|
| H A D | SortJavaScriptImports.cpp | 198 FirstNonImportLine->First->TokenText.trim() == in analyze() 378 StringRef CommentText = Current->TokenText.trim(); in parseModuleReferences() 455 Current->TokenText.substr(1, Current->TokenText.size() - 2); in parseModuleReference() 469 Current->TokenText.substr(1, Current->TokenText.size() - 2); in parseModuleReference() 500 Reference.Prefix = Current->TokenText; in parseStarBinding() 509 Reference.DefaultImport = Current->TokenText; in parseNamedBindings() 543 Symbol.Symbol = Current->TokenText; in parseNamedBindings() 553 Symbol.Alias = Current->TokenText; in parseNamedBindings()
|
| H A D | QualifierAlignmentFixer.cpp | 137 NewText += Next->TokenText; in insertQualifierAfter() 149 NewText += First->TokenText; in insertQualifierBefore() 179 NewText += Last->TokenText; in rotateTokens() 189 NewText += Tok->TokenText; in rotateTokens() 197 NewText += First->TokenText; in rotateTokens() 512 if (Tok->TokenText.upper() == Tok->TokenText.str()) { in isPossibleMacro() 514 return (Tok->TokenText.size() != 1); in isPossibleMacro()
|
| H A D | ContinuationIndenter.cpp | 154 || !TokenText.startswith("R\"") || !TokenText.endswith("\"")) { in getRawStringDelimiter() 161 size_t LParenPos = TokenText.substr(0, 19).find_first_of('('); in getRawStringDelimiter() 164 StringRef Delimiter = TokenText.substr(2, LParenPos - 2); in getRawStringDelimiter() 167 size_t RParenPos = TokenText.size() - Delimiter.size() - 2; in getRawStringDelimiter() 168 if (TokenText[RParenPos] != ')') in getRawStringDelimiter() 170 if (!TokenText.substr(RParenPos + 1).startswith(Delimiter)) in getRawStringDelimiter() 2045 return Tok->TokenText; in getEnclosingFunctionName() 2053 auto Delimiter = getRawStringDelimiter(Current.TokenText); in getRawStringStyle() 2097 StringRef Text = Current.TokenText; in createBreakableToken() 2138 if (!(T->TokenText.startswith("//") || T->TokenText.startswith("#"))) in createBreakableToken() [all …]
|
| H A D | TokenAnnotator.cpp | 1490 (Tok.Next->Next->TokenText == "module" || in isClosureImportStatement() 1491 Tok.Next->Next->TokenText == "provide" || in isClosureImportStatement() 1770 LeadingIdentifier->TokenText == Current.Next->TokenText; in isDeductionGuide() 1868 if (Current.TokenText.startswith("/*")) { in determineTokenType() 1869 if (Current.TokenText.endswith("*/")) { in determineTokenType() 1896 BeforeParen->TokenText == BeforeParen->TokenText.upper() && in determineTokenType() 3643 (Left.TokenText == "L" || Left.TokenText == "u" || in spaceRequiredBetween() 3644 Left.TokenText == "U" || Left.TokenText == "u8" || in spaceRequiredBetween() 3645 Left.TokenText == "LR" || Left.TokenText == "uR" || in spaceRequiredBetween() 3646 Left.TokenText == "UR" || Left.TokenText == "u8R")) { in spaceRequiredBetween() [all …]
|
| H A D | UnwrappedLineParser.cpp | 815 Length -= OpeningBrace->TokenText.size() + 1; in mightFitOnOneLine() 981 if (I->Tok->TokenText != "goog") in isGoogScope() 987 if (I->Tok->TokenText != "scope") in isGoogScope() 1209 IncludeGuardToken->TokenText == FormatTok->TokenText) { in parsePPDefine() 1385 !FormatTok->TokenText.startswith("//")) { in parseModuleImport() 1903 StringRef Text = FormatTok->TokenText; in parseStructuralElement() 3696 FormatTok->TokenText != FormatTok->TokenText.upper(); in parseRecord() 4058 StringRef IndentContent = FormatTok.TokenText; in continuesLineCommentSection() 4059 if (FormatTok.TokenText.startswith("//") || in continuesLineCommentSection() 4060 FormatTok.TokenText.startswith("/*")) { in continuesLineCommentSection() [all …]
|
| H A D | AffectedRangeManager.cpp | 79 End = End.getLocWithOffset(Last.TokenText.size()); in affectsTokenRange()
|
| H A D | UnwrappedLineFormatter.cpp | 187 return NamespaceToken ? NamespaceToken->TokenText : StringRef(); in getNamespaceTokenText() 195 return NamespaceToken ? NamespaceToken->TokenText : StringRef(); in getMatchingNamespaceTokenText() 366 nsToken->TokenText == getNamespaceTokenText(I[i + 1]) && in tryFitMultipleLinesInOne() 382 nsToken->TokenText == in tryFitMultipleLinesInOne() 909 llvm::dbgs() << (P.Tok ? P.Tok->TokenText : "F") << "|" << P.Indent << "|" in printLineState() 912 llvm::dbgs() << State.NextToken->TokenText << "\n"; in printLineState()
|
| H A D | UsingDeclarationsSorter.cpp | 102 Label.append(Tok->TokenText.str()); in computeUsingDeclarationLabel()
|
| H A D | FormatToken.h | 245 StringRef TokenText; member 595 if (is(TT_TemplateString) && TokenText.endswith("${")) in opensScope() 605 if (is(TT_TemplateString) && TokenText.startswith("}")) in closesScope() 674 StringRef Content = TokenText; in isLabelString()
|
| H A D | Format.cpp | 1953 StringRef Input = FormatTok->TokenText; in requoteJSStringLiteral() 2197 Prev->Tok.getLocation().getLocWithOffset(Prev->TokenText.size()); in insertTrailingCommas() 2537 if (Line->First && (Line->First->TokenText.startswith("#") || in guessIsObjC() 2538 Line->First->TokenText == "__pragma" || in guessIsObjC() 2539 Line->First->TokenText == "_Pragma")) { in guessIsObjC() 2551 FormatTok->TokenText)) || in guessIsObjC() 2562 << " token: " << FormatTok->TokenText << " token type: " in guessIsObjC()
|
| /llvm-project-15.0.7/clang/unittests/Format/ |
| H A D | TestLexer.h | 34 Stream << "(" << Tok.Tok.getName() << ", \"" << Tok.TokenText.str() << "\" , " 54 return (R + Tok->TokenText).str(); in text()
|
| H A D | MacroExpanderTest.cpp | 53 " / " + Tokens[I]->TokenText) in expectAttributes()
|
| H A D | MacroCallReconstructorTest.cpp | 107 (*It)->TokenText == Token->TokenText); in consume()
|
| /llvm-project-15.0.7/clang/lib/Frontend/ |
| H A D | PrintPreprocessedOutput.cpp | 406 const std::string TokenText = PP.getSpelling(IncludeTok); in InclusionDirective() local 407 assert(!TokenText.empty()); in InclusionDirective() 408 OS << "#" << TokenText << " " in InclusionDirective()
|
| /llvm-project-15.0.7/clang/lib/ASTMatchers/ |
| H A D | ASTMatchersInternal.cpp | 683 StringRef TokenText = Lexer::getSpelling(SM.getSpellingLoc(Loc), Buffer, SM, in isTokenAtLoc() local 685 return !Invalid && Text == TokenText; in isTokenAtLoc()
|