/freebsd/contrib/llvm-project/clang/lib/Format/ |
H A D | FormatTokenLexer.cpp | 231 if (Tokens.back()->TokenText.size() == 1 && in tryMergePreviousTokens() 301 if (Tokens.back()->TokenText == "!cond") in tryMergePreviousTokens() 335 At->TokenText = StringRef(At->TokenText.begin(), in tryMergeNSStringLiteral() 336 String->TokenText.end() - At->TokenText.begin()); in tryMergeNSStringLiteral() 353 Hash->TokenText = in tryMergeJSPrivateIdentifier() 354 StringRef(Hash->TokenText.begin(), in tryMergeJSPrivateIdentifier() 355 Identifier->TokenText.end() - Hash->TokenText.begin()); in tryMergeJSPrivateIdentifier() 377 if (Prefix->isNot(tok::at) && Prefix->TokenText != "$") in tryMergeCSharpStringLiteral() 382 if ((Tok->TokenText == "$" && Prefix->is(tok::at)) || in tryMergeCSharpStringLiteral() 383 (Tok->is(tok::at) && Prefix->TokenText == "$")) { in tryMergeCSharpStringLiteral() [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() 170 assert(hasArity(ID->TokenText, OptionalArgs->size())); in expand() 172 assert(objectLike(ID->TokenText)); in expand() 174 ? FunctionLike.find(ID->TokenText) in expand() 177 : ObjectLike.find(ID->TokenText)->second; in expand() 194 if (Tok->isNot(tok::identifier) || ExpandedArgs.contains(Tok->TokenText)) in expand() 196 ExpandedArgs.insert(Tok->TokenText); in expand() 197 auto I = Def.ArgMap.find(Tok->TokenText); in expand()
|
H A D | BreakableToken.cpp | 222 StringRef Content = Token.TokenText.substr(2).ltrim(); in switchesFormatting() 274 assert(Tok.TokenText.starts_with(Prefix) && Tok.TokenText.ends_with(Postfix)); in BreakableStringLiteral() 275 Line = Tok.TokenText.substr( in BreakableStringLiteral() 276 Prefix.size(), Tok.TokenText.size() - Prefix.size() - Postfix.size()); in BreakableStringLiteral() 404 Tok, /*Offset=*/Tok.TokenText.size() - 1, /*ReplaceChars=*/1, in updateAfterBroken() 439 Text.data() - tokenAt(LineIndex).TokenText.data() + Split.first; in compressWhitespace() 490 StringRef TokenText(Tok.TokenText); in BreakableBlockComment() local 491 assert(TokenText.starts_with("/*") && TokenText.ends_with("*/")); in BreakableBlockComment() 492 TokenText.substr(2, TokenText.size() - 4) in BreakableBlockComment() 731 Text.data() - tokenAt(LineIndex).TokenText.data() + Split.first; in insertBreak() [all …]
|
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() 337 llvm::dbgs() << "At token: " << Token->TokenText << "\n"; in endReconstruction() 375 llvm::dbgs() << (P.first ? P.first->TokenText : "<null>"); in debugParentMap() 379 llvm::dbgs() << " -> " << (I->second ? I->second->TokenText : "<null>"); in debugParentMap() 502 LLVM_DEBUG(llvm::dbgs() << "-> " << Token->TokenText << "\n"); in appendToken() 556 llvm::dbgs() << N->Tok->TokenText << " "; in debug() [all …]
|
H A D | SortJavaScriptImports.cpp | 197 isClangFormatOn(FirstNonImportLine->First->TokenText.trim()))) { in analyze() 377 StringRef CommentText = Current->TokenText.trim(); in parseModuleReferences() 454 Current->TokenText.substr(1, Current->TokenText.size() - 2); in parseModuleReference() 468 Current->TokenText.substr(1, Current->TokenText.size() - 2); in parseModuleReference() 504 Reference.Prefix = Current->TokenText; in parseStarBinding() 519 Reference.DefaultImport = Current->TokenText; in parseNamedBindings() 563 Symbol.Symbol = Current->TokenText; in parseNamedBindings() 570 Symbol.Alias = Current->TokenText; in parseNamedBindings()
|
H A D | QualifierAlignmentFixer.cpp | 85 NewText += First->TokenText; in insertQualifierAfter() 98 NewText += First->TokenText; in insertQualifierBefore() 128 NewText += Last->TokenText; in rotateTokens() 138 NewText += Tok->TokenText; in rotateTokens() 146 NewText += First->TokenText; in rotateTokens() 634 if (Tok->TokenText.upper() == Tok->TokenText.str()) { in isPossibleMacro() 636 return Tok->TokenText.size() != 1; in isPossibleMacro()
|
H A D | ContinuationIndenter.cpp | 162 static std::optional<StringRef> getRawStringDelimiter(StringRef TokenText) { in getRawStringDelimiter() argument 163 if (TokenText.size() < 5 // The smallest raw string possible is 'R"()"'. in getRawStringDelimiter() 164 || !TokenText.starts_with("R\"") || !TokenText.ends_with("\"")) { in getRawStringDelimiter() 171 size_t LParenPos = TokenText.substr(0, 19).find_first_of('('); in getRawStringDelimiter() 174 StringRef Delimiter = TokenText.substr(2, LParenPos - 2); in getRawStringDelimiter() 177 size_t RParenPos = TokenText.size() - Delimiter.size() - 2; in getRawStringDelimiter() 178 if (TokenText[RParenPos] != ')') in getRawStringDelimiter() 180 if (!TokenText.substr(RParenPos + 1).starts_with(Delimiter)) in getRawStringDelimiter() 592 if (BreakBeforeDecoratedTokens.contains(Current.TokenText)) in mustBreak() 618 ((Previous.is(tok::identifier) && Previous.TokenText == "endl") || in mustBreak() [all …]
|
H A D | UnwrappedLineParser.cpp | 52 << ", OC=" << I->Tok->OriginalColumn << ", \"" << I->Tok->TokenText in printLine() 724 Length -= OpeningBrace->TokenText.size() + 1; in mightFitOnOneLine() 729 Length -= FirstToken->TokenText.size() + 1; in mightFitOnOneLine() 929 if (I->Tok->TokenText != "goog") in isGoogScope() 935 if (I->Tok->TokenText != "scope") in isGoogScope() 1095 if (!IfDef && (FormatTok->is(tok::kw_false) || FormatTok->TokenText == "0")) in parsePPIf() 1097 if (IfDef && !IfNDef && FormatTok->TokenText == "SWIG") in parsePPIf() 1158 IncludeGuardToken->TokenText == FormatTok->TokenText) { in parsePPDefine() 1355 !FormatTok->TokenText in parseModuleImport() [all...] |
H A D | TokenAnnotator.cpp | 977 CurrentToken->TokenText.front() == '$') { in tryToParseTableGenTokVar() 1019 return std::find(Opes.begin(), Opes.end(), Tok.TokenText.str()) != in isTableGenDAGArgBreakingOperator() 1650 Previous->TokenText.starts_with("\"\"")) { in consumeToken() 1828 !CurrentToken->TokenText.starts_with("//")) { in parseIncludeDirective() 2044 return Tok.TokenText == "goog" && Tok.Next && Tok.Next->is(tok::period) && in isClosureImportStatement() 2046 (Tok.Next->Next->TokenText == "module" || in isClosureImportStatement() 2047 Tok.Next->Next->TokenText == "provide" || in isClosureImportStatement() 2048 Tok.Next->Next->TokenText == "require" || in isClosureImportStatement() 2049 Tok.Next->Next->TokenText == "requireType" || in isClosureImportStatement() 2050 Tok.Next->Next->TokenText == "forwardDeclare") && in isClosureImportStatement() [all …]
|
H A D | FormatToken.h | 318 StringRef TokenText; member 707 if (is(TT_TemplateString) && TokenText.ends_with("${")) in opensScope() 717 if (is(TT_TemplateString) && TokenText.starts_with("}")) in closesScope() 737 assert(!TokenText.empty()); in isCppAlternativeOperatorKeyword() 738 if (!isalpha(TokenText[0])) in isCppAlternativeOperatorKeyword() 805 StringRef Content = TokenText; in isLabelString() 1963 return FormatTok.is(tok::comment) && !FormatTok.TokenText.starts_with("/*"); in isLineComment()
|
H A D | UnwrappedLineFormatter.cpp | 200 return NamespaceToken ? NamespaceToken->TokenText : StringRef(); in getNamespaceTokenText() 208 return NamespaceToken ? NamespaceToken->TokenText : StringRef(); in getMatchingNamespaceTokenText() 372 I + J != E && NSToken->TokenText == getNamespaceTokenText(I[J]) && in tryFitMultipleLinesInOne() 398 nsToken->TokenText == in tryFitMultipleLinesInOne() 985 llvm::dbgs() << (P.Tok ? P.Tok->TokenText : "F") << "|" << P.Indent << "|" in printLineState() 988 llvm::dbgs() << State.NextToken->TokenText << "\n"; in printLineState()
|
H A D | AffectedRangeManager.cpp | 79 End = End.getLocWithOffset(Last.TokenText.size()); in affectsTokenRange()
|
H A D | FormatTokenSource.h | 179 << "] Token: " << Tok->Tok.getName() << " / " << Tok->TokenText
|
H A D | UsingDeclarationsSorter.cpp | 125 Label.append(Tok->TokenText.str()); in computeUsingDeclarationLabel()
|
H A D | FormatToken.cpp | 49 CppNonKeywordTypes.end(), TokenText)); in isTypeName()
|
H A D | Format.cpp | 2357 StringRef Input = FormatTok->TokenText; in requoteJSStringLiteral() 2603 Prev->Tok.getLocation().getLocWithOffset(Prev->TokenText.size()); in insertTrailingCommas() 2948 if (Line->First && (Line->First->TokenText.starts_with("#") || in guessIsObjC() 2949 Line->First->TokenText == "__pragma" || in guessIsObjC() 2950 Line->First->TokenText == "_Pragma")) { in guessIsObjC() 2962 FormatTok->TokenText)) || in guessIsObjC() 2974 << " token: " << FormatTok->TokenText << " token type: " in guessIsObjC()
|
/freebsd/contrib/llvm-project/clang/lib/Frontend/ |
H A D | PrintPreprocessedOutput.cpp | 493 const std::string TokenText = PP.getSpelling(IncludeTok); in InclusionDirective() local 494 assert(!TokenText.empty()); in InclusionDirective() 495 *OS << "#" << TokenText << " " in InclusionDirective()
|