| /openbsd-src/gnu/llvm/clang/lib/Format/ |
| H A D | FormatTokenLexer.cpp | 215 if (Tokens.back()->TokenText.size() == 1 && in tryMergePreviousTokens() 278 At->TokenText = StringRef(At->TokenText.begin(), in tryMergeNSStringLiteral() 279 String->TokenText.end() - At->TokenText.begin()); in tryMergeNSStringLiteral() 296 Hash->TokenText = in tryMergeJSPrivateIdentifier() 297 StringRef(Hash->TokenText.begin(), in tryMergeJSPrivateIdentifier() 298 Identifier->TokenText.end() - Hash->TokenText.begin()); in tryMergeJSPrivateIdentifier() 320 if (Prefix->isNot(tok::at) && Prefix->TokenText != "$") in tryMergeCSharpStringLiteral() 325 if ((Tok->TokenText == "$" && Prefix->is(tok::at)) || in tryMergeCSharpStringLiteral() 326 (Tok->is(tok::at) && Prefix->TokenText == "$")) { in tryMergeCSharpStringLiteral() 336 Prefix->TokenText = in tryMergeCSharpStringLiteral() [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() 276 Prefix.size(), Tok.TokenText.size() - Prefix.size() - Postfix.size()); in BreakableStringLiteral() 325 Text.data() - tokenAt(LineIndex).TokenText.data() + Split.first; in compressWhitespace() 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() 619 Text.data() - tokenAt(LineIndex).TokenText.data() + Split.first; in insertBreak() 666 tokenAt(LineIndex).TokenText.data(); in reflow() [all …]
|
| H A D | NamespaceEndCommentsFixer.cpp | 74 name += Tok->TokenText; in computeName() 90 FirstNSName += FirstNSTok->TokenText; in computeName() 101 auto AddToken = [&name](const FormatToken *Tok) { name += Tok->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() [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() 336 llvm::dbgs() << "At token: " << Token->TokenText << "\n"; in endReconstruction() 374 llvm::dbgs() << (P.first ? P.first->TokenText : "<null>"); in debugParentMap() 378 llvm::dbgs() << " -> " << (I->second ? I->second->TokenText : "<null>"); in debugParentMap() 499 LLVM_DEBUG(llvm::dbgs() << "-> " << Token->TokenText << "\n"); in appendToken() 533 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 | 138 NewText += Next->TokenText; in insertQualifierAfter() 150 NewText += First->TokenText; in insertQualifierBefore() 180 NewText += Last->TokenText; in rotateTokens() 190 NewText += Tok->TokenText; in rotateTokens() 198 NewText += First->TokenText; in rotateTokens() 517 if (Tok->TokenText.upper() == Tok->TokenText.str()) { in isPossibleMacro() 519 return (Tok->TokenText.size() != 1); in isPossibleMacro()
|
| H A D | ContinuationIndenter.cpp | 153 static std::optional<StringRef> getRawStringDelimiter(StringRef TokenText) { in getRawStringDelimiter() argument 154 if (TokenText.size() < 5 // The smallest raw string possible is 'R"()"'. in getRawStringDelimiter() 155 || !TokenText.startswith("R\"") || !TokenText.endswith("\"")) { in getRawStringDelimiter() 162 size_t LParenPos = TokenText.substr(0, 19).find_first_of('('); in getRawStringDelimiter() 165 StringRef Delimiter = TokenText.substr(2, LParenPos - 2); in getRawStringDelimiter() 168 size_t RParenPos = TokenText.size() - Delimiter.size() - 2; in getRawStringDelimiter() 169 if (TokenText[RParenPos] != ')') in getRawStringDelimiter() 171 if (!TokenText.substr(RParenPos + 1).startswith(Delimiter)) in getRawStringDelimiter() 563 if (BreakBeforeDecoratedTokens.contains(Current.TokenText)) in mustBreak() 591 ((Previous.is(tok::identifier) && Previous.TokenText == "endl") || in mustBreak() [all …]
|
| H A D | TokenAnnotator.cpp | 1208 CurrentToken->Previous->TokenText.startswith("\"\"")) { in consumeToken() 1342 !CurrentToken->TokenText.startswith("//")) { in parseIncludeDirective() 1554 return Tok.TokenText == "goog" && Tok.Next && Tok.Next->is(tok::period) && in isClosureImportStatement() 1556 (Tok.Next->Next->TokenText == "module" || in isClosureImportStatement() 1557 Tok.Next->Next->TokenText == "provide" || in isClosureImportStatement() 1558 Tok.Next->Next->TokenText == "require" || in isClosureImportStatement() 1559 Tok.Next->Next->TokenText == "requireType" || in isClosureImportStatement() 1560 Tok.Next->Next->TokenText == "forwardDeclare") && in isClosureImportStatement() 1826 LeadingIdentifier->TokenText == Current.Next->TokenText; in isDeductionGuide() 1924 if (Current.TokenText.startswith("/*")) { in determineTokenType() [all …]
|
| H A D | UnwrappedLineParser.cpp | 75 << ", OC=" << I->Tok->OriginalColumn << ", \"" << I->Tok->TokenText in printLine() 116 return FormatTok.is(tok::comment) && !FormatTok.TokenText.startswith("/*"); in isLineComment() 323 << "] Token: " << Tok->Tok.getName() << " / " << Tok->TokenText in dbgToken() 840 Length -= OpeningBrace->TokenText.size() + 1; in mightFitOnOneLine() 845 Length -= FirstToken->TokenText.size() + 1; in mightFitOnOneLine() 1039 if (I->Tok->TokenText != "goog") in isGoogScope() 1045 if (I->Tok->TokenText != "scope") in isGoogScope() 1206 if (!IfDef && (FormatTok->is(tok::kw_false) || FormatTok->TokenText == "0")) in parsePPIf() 1208 if (IfDef && !IfNDef && FormatTok->TokenText == "SWIG") in parsePPIf() 1269 IncludeGuardToken->TokenText == FormatTok->TokenText) { in parsePPDefine() [all …]
|
| H A D | AffectedRangeManager.cpp | 79 End = End.getLocWithOffset(Last.TokenText.size()); in affectsTokenRange()
|
| H A D | UnwrappedLineFormatter.cpp | 194 return NamespaceToken ? NamespaceToken->TokenText : StringRef(); in getNamespaceTokenText() 202 return NamespaceToken ? NamespaceToken->TokenText : StringRef(); in getMatchingNamespaceTokenText() 373 nsToken->TokenText == getNamespaceTokenText(I[i + 1]) && in tryFitMultipleLinesInOne() 389 nsToken->TokenText == in tryFitMultipleLinesInOne() 931 llvm::dbgs() << (P.Tok ? P.Tok->TokenText : "F") << "|" << P.Indent << "|" in printLineState() 934 llvm::dbgs() << State.NextToken->TokenText << "\n"; in printLineState()
|
| H A D | UsingDeclarationsSorter.cpp | 125 Label.append(Tok->TokenText.str()); in computeUsingDeclarationLabel()
|
| H A D | FormatToken.h | 265 StringRef TokenText; member 625 if (is(TT_TemplateString) && TokenText.endswith("${")) in opensScope() 635 if (is(TT_TemplateString) && TokenText.startswith("}")) in closesScope() 705 StringRef Content = TokenText; in isLabelString()
|
| H A D | Format.cpp | 2152 StringRef Input = FormatTok->TokenText; in requoteJSStringLiteral() 2398 Prev->Tok.getLocation().getLocWithOffset(Prev->TokenText.size()); in insertTrailingCommas() 2738 if (Line->First && (Line->First->TokenText.startswith("#") || in guessIsObjC() 2739 Line->First->TokenText == "__pragma" || in guessIsObjC() 2740 Line->First->TokenText == "_Pragma")) { in guessIsObjC() 2752 FormatTok->TokenText)) || in guessIsObjC() 2763 << " token: " << FormatTok->TokenText << " token type: " in guessIsObjC()
|
| /openbsd-src/gnu/llvm/clang/lib/Frontend/ |
| H A D | PrintPreprocessedOutput.cpp | 400 const std::string TokenText = PP.getSpelling(IncludeTok); in InclusionDirective() local 401 assert(!TokenText.empty()); in InclusionDirective() 402 OS << "#" << TokenText << " " in InclusionDirective()
|
| /openbsd-src/gnu/llvm/clang/lib/ASTMatchers/ |
| H A D | ASTMatchersInternal.cpp | 684 StringRef TokenText = Lexer::getSpelling(SM.getSpellingLoc(Loc), Buffer, SM, in isTokenAtLoc() local 686 return !Invalid && Text == TokenText; in isTokenAtLoc()
|