/freebsd/contrib/llvm-project/clang/lib/Format/ |
H A D | FormatTokenLexer.cpp | 80 assert(Tokens.empty()); in lex() 83 Tokens.push_back(getNextToken()); in lex() 100 if (Tokens.back()->NewlinesBefore > 0 || Tokens.back()->IsMultiline) in lex() 101 FirstInLineIndex = Tokens.size() - 1; in lex() 102 } while (Tokens.back()->isNot(tok::eof)); in lex() 104 auto &TokEOF = *Tokens.back(); in lex() 110 return Tokens; in lex() 138 Tokens.back()->Tok.setKind(tok::pipepipe); in tryMergePreviousTokens() 143 Tokens.back()->Tok.setKind(tok::period); in tryMergePreviousTokens() 163 Tokens.back()->Tok.setKind(tok::l_square); in tryMergePreviousTokens() [all …]
|
H A D | FormatTokenSource.h | 74 virtual FormatToken *insertTokens(ArrayRef<FormatToken *> Tokens) = 0; 88 IndexedTokenSource(ArrayRef<FormatToken *> Tokens) in IndexedTokenSource() argument 89 : Tokens(Tokens), Position(-1) {} in IndexedTokenSource() 97 return Tokens[Position]; in getNextToken() 104 return Tokens[Position]; in getNextToken() 108 assert(Position <= 0 || Tokens[Position - 1]->isNot(tok::eof)); in getPreviousToken() 109 return Position > 0 ? Tokens[Position - 1] : nullptr; in getPreviousToken() 114 return Tokens[Position]; 117 while (Tokens[Next]->is(tok::comment)) 123 return Tokens[Next]; [all …]
|
H A D | MacroCallReconstructor.cpp | 35 for (const auto &N : Line.Tokens) { in forEachToken() 48 Result.Tokens.push_back(std::make_unique<LineNode>()); in MacroCallReconstructor() 62 assert(Result.Tokens.size() == 1 && in takeResult() 63 Result.Tokens.front()->Children.size() == 1); in takeResult() 65 *Result.Tokens.front()->Children.front(), Result.Level); in takeResult() 66 assert(!Final.Tokens.empty()); in takeResult() 162 (!ActiveReconstructedLines.back()->Tokens.empty() && in prepareParent() 163 Parent == ActiveReconstructedLines.back()->Tokens.back()->Tok)) { in prepareParent() 166 while (ActiveReconstructedLines.back()->Tokens.empty() || in prepareParent() 167 (Parent != ActiveReconstructedLines.back()->Tokens.back()->Tok && in prepareParent() [all …]
|
H A D | UnwrappedLineParser.cpp | 43 for (std::list<UnwrappedLineNode>::const_iterator I = Line.Tokens.begin(), in printLine() 44 E = Line.Tokens.end(); in printLine() 107 else if (!Parser.Line->Tokens.empty()) in ScopedLineState() 108 Parser.CurrentLines = &Parser.Line->Tokens.back().Children; in ScopedLineState() 119 if (!Parser.Line->Tokens.empty()) in ~ScopedLineState() 121 assert(Parser.Line->Tokens.empty()); in ~ScopedLineState() 160 ArrayRef<FormatToken *> Tokens, UnwrappedLineConsumer &Callback, in UnwrappedLineParser() argument 166 CommentPragmasRegex(Style.CommentPragmas), Tokens(nullptr), in UnwrappedLineParser() 167 Callback(Callback), AllTokens(Tokens), PPBranchLevel(-1), in UnwrappedLineParser() 211 Tokens in parse() 693 auto &Tokens = ParsedLine.Tokens; mightFitOnOneLine() local 3888 FormatTokenSource *Tokens; global() member in clang::format::__anon89962d1d0811::ScopedTokenPosition 3891 ScopedTokenPosition(FormatTokenSource * Tokens) ScopedTokenPosition() argument [all...] |
H A D | MacroExpander.cpp | 50 DefinitionParser(ArrayRef<FormatToken *> Tokens) : Tokens(Tokens) { in DefinitionParser() argument 51 assert(!Tokens.empty()); in DefinitionParser() 52 Current = Tokens[0]; in DefinitionParser() 109 if (Pos + 1 < Tokens.size()) in nextToken() 111 Current = Tokens[Pos]; in nextToken() 118 ArrayRef<FormatToken *> Tokens; member in clang::format::MacroExpander::DefinitionParser 140 const auto Tokens = Lex.lex(); in parseDefinition() local 141 if (!Tokens.empty()) { in parseDefinition() 142 DefinitionParser Parser(Tokens); in parseDefinition()
|
H A D | TokenAnnotator.h | 50 : First(Line.Tokens.front().Tok), Type(LT_Other), Level(Line.Level), in AnnotatedLine() 62 assert(!Line.Tokens.empty()); in AnnotatedLine() 69 addChildren(Line.Tokens.front(), Current); in AnnotatedLine() 70 for (const UnwrappedLineNode &Node : llvm::drop_begin(Line.Tokens)) { in AnnotatedLine() 119 template <typename... Ts> bool startsWith(Ts... Tokens) const { in startsWith() argument 120 return First && First->startsSequence(Tokens...); in startsWith() 127 template <typename... Ts> bool endsWith(Ts... Tokens) const { in endsWith() argument 128 return Last && Last->endsSequence(Tokens...); in endsWith()
|
H A D | DefinitionBlockSeparator.h | 32 FormatTokenLexer &Tokens) override; 36 tooling::Replacements &Result, FormatTokenLexer &Tokens);
|
H A D | BreakableToken.cpp | 447 return Tokens[LineIndex] ? *Tokens[LineIndex] : Tok; in tokenAt() 501 Tokens.resize(Lines.size()); in BreakableBlockComment() 772 assert(Tokens[LineIndex - 1] == Tokens[LineIndex] && in reflow() 886 Tokens.resize(Lines.size()); in BreakableLineCommentSection() 976 Tokens[i] = LineTok; in BreakableLineCommentSection() 1057 if (LineIndex > 0 && Tokens[LineIndex] != Tokens[LineIndex - 1]) { in reflow() 1061 *Tokens[LineIndex], /*Newlines=*/0, /*Spaces=*/0, in reflow() 1082 Whitespaces.replaceWhitespaceInToken(*Tokens[LineIndex], Offset, in reflow() 1095 Whitespaces.replaceWhitespaceInToken(*Tokens[LineIndex], Offset, in reflow() 1112 if (LineIndex > 0 && Tokens[LineIndex] != Tokens[LineIndex - 1]) { in adaptStartOfLine() [all …]
|
H A D | QualifierAlignmentFixer.h | 60 FormatTokenLexer &Tokens) override; 65 FormatTokenLexer &Tokens,
|
H A D | UnwrappedLineParser.h | 36 std::list<UnwrappedLineNode> Tokens; member 105 unsigned FirstStartColumn, ArrayRef<FormatToken *> Tokens, 327 FormatTokenSource *Tokens; variable
|
/freebsd/contrib/llvm-project/clang/include/clang/Lex/ |
H A D | PPEmbedParameters.h | 46 SmallVector<Token, 2> Tokens; 48 PPEmbedParameterPrefix(SmallVectorImpl<Token> &&Tokens, SourceRange R) in PPEmbedParameterPrefix() argument 49 : PPDirectiveParameter(R), Tokens(std::move(Tokens)) {} in PPEmbedParameterPrefix() 56 SmallVector<Token, 2> Tokens; 58 PPEmbedParameterSuffix(SmallVectorImpl<Token> &&Tokens, SourceRange R) in PPEmbedParameterSuffix() argument 59 : PPDirectiveParameter(R), Tokens(std::move(Tokens)) {} in PPEmbedParameterSuffix() 66 SmallVector<Token, 2> Tokens; 68 PPEmbedParameterIfEmpty(SmallVectorImpl<Token> &&Tokens, SourceRange R) in PPEmbedParameterIfEmpty() argument 69 : PPDirectiveParameter(R), Tokens(std::move(Tokens)) {} in PPEmbedParameterIfEmpty() 82 return MaybePrefixParam->Tokens.size(); in PrefixTokenCount() [all …]
|
H A D | DependencyDirectivesScanner.h | 96 ArrayRef<Token> Tokens; member 102 Directive(DirectiveKind K, ArrayRef<Token> Tokens) in Directive() 103 : Tokens(Tokens), Kind(K) {} in Directive() 118 StringRef Input, SmallVectorImpl<dependency_directives_scan::Token> &Tokens,
|
H A D | MacroInfo.h | 263 void setTokens(ArrayRef<Token> Tokens, llvm::BumpPtrAllocator &PPAllocator) { in setTokens() argument 269 if (Tokens.empty()) in setTokens() 272 NumReplacementTokens = Tokens.size(); in setTokens() 273 Token *NewReplacementTokens = PPAllocator.Allocate<Token>(Tokens.size()); in setTokens() 274 std::copy(Tokens.begin(), Tokens.end(), NewReplacementTokens); in setTokens()
|
/freebsd/contrib/llvm-project/clang/lib/Lex/ |
H A D | TokenLexer.cpp | 55 Tokens = &*Macro->tokens_begin(); in Init() 66 assert(Tokens[0].getLocation().isValid()); in Init() 67 assert((Tokens[0].getLocation().isFileID() || Tokens[0].is(tok::comment)) && in Init() 75 MacroDefStart = SM.getExpansionLoc(Tokens[0].getLocation()); in Init() 106 Tokens = TokArray; in Init() 130 delete [] Tokens; in destroy() 131 Tokens = nullptr; in destroy() 257 const Token &CurTok = Tokens[I]; in ExpandFunctionArguments() 264 if (I != 0 && !Tokens[I-1].is(tok::hashhash) && CurTok.hasLeadingSpace()) in ExpandFunctionArguments() 269 assert(Tokens[I + 1].is(tok::l_paren) && in ExpandFunctionArguments() [all …]
|
H A D | DependencyDirectivesScanner.cpp | 64 SmallVectorImpl<dependency_directives_scan::Token> &Tokens, in Scanner() 66 : Input(Input), Tokens(Tokens), Diags(Diags), in Scanner() 155 Tokens.append(CurDirToks); in pushDirective() 161 Tokens.pop_back_n(DirsWithToks.pop_back_val().NumTokens); in popDirective() 177 SmallVectorImpl<dependency_directives_scan::Token> &Tokens; member 949 (Tokens.empty() || LastTokenPtr > Input.begin() + Tokens.back().Offset)) in scan() 954 ArrayRef<dependency_directives_scan::Token> RemainingTokens = Tokens; in scan() 967 StringRef Input, SmallVectorImpl<dependency_directives_scan::Token> &Tokens, in scanSourceForDependencyDirectives() argument 970 return Scanner(Input, Tokens, Diags, InputSourceLoc).scan(Directives); in scanSourceForDependencyDirectives() 1002 for (const dependency_directives_scan::Token &Tok : Directive.Tokens) { in printDependencyDirectivesAsSource()
|
/freebsd/contrib/llvm-project/llvm/lib/Target/SPIRV/ |
H A D | SPIRVCommandLine.cpp | 76 llvm::SmallVector<llvm::StringRef, 10> Tokens; in parse() local 77 ArgValue.split(Tokens, ",", -1, false); in parse() 78 std::sort(Tokens.begin(), Tokens.end()); in parse() 82 for (const auto &Token : Tokens) { in parse() 102 if (std::find(Tokens.begin(), Tokens.end(), "+" + ExtensionName.str()) != in parse() 103 Tokens.end()) in parse()
|
/freebsd/contrib/llvm-project/clang/include/clang/Tooling/Syntax/ |
H A D | TokenBufferTokenManager.h | 22 TokenBufferTokenManager(const TokenBuffer &Tokens, in TokenBufferTokenManager() argument 24 : Tokens(Tokens), LangOpts(LangOpts), SM(SourceMgr) {} in TokenBufferTokenManager() 45 const TokenBuffer &tokenBuffer() const { return Tokens; } in tokenBuffer() 58 const TokenBuffer &Tokens; variable
|
H A D | Tokens.h | 384 spelledTokensTouching(SourceLocation Loc, const syntax::TokenBuffer &Tokens); 386 spelledTokensTouching(SourceLocation Loc, llvm::ArrayRef<syntax::Token> Tokens); 392 llvm::ArrayRef<syntax::Token> Tokens); 395 const syntax::TokenBuffer &Tokens);
|
/freebsd/contrib/llvm-project/clang/lib/Tooling/Syntax/ |
H A D | ComputeReplacements.cpp | 111 &TU, TBTM, [&](llvm::ArrayRef<syntax::Token> Tokens, bool IsOriginal) { in computeReplacements() argument 114 syntax::Token::range(SM, Tokens.front(), Tokens.back()).text(SM); in computeReplacements() 117 assert(NextOriginal <= Tokens.begin()); in computeReplacements() 119 if (NextOriginal != Tokens.begin()) { in computeReplacements() 121 emitReplacement(llvm::ArrayRef(NextOriginal, Tokens.begin())); in computeReplacements() 126 NextOriginal = Tokens.end(); in computeReplacements()
|
H A D | BuildTree.cpp | 441 auto Tokens = TBTM.tokenBuffer().expandedTokens(); in finalize() local 442 assert(!Tokens.empty()); in finalize() 443 assert(Tokens.back().kind() == tok::eof); in finalize() 446 Pending.foldChildren(TBTM.tokenBuffer(), Tokens.drop_back(), in finalize() 477 auto Tokens = getRange(D->getSourceRange()); in getTemplateRange() local 478 return maybeAppendSemicolon(Tokens, D); in getTemplateRange() 510 ArrayRef<syntax::Token> Tokens; in getDeclarationRange() local 513 Tokens = getRange(S->TypeDecl::getBeginLoc(), S->getEndLoc()); in getDeclarationRange() 515 Tokens = getRange(D->getSourceRange()); in getDeclarationRange() 516 return maybeAppendSemicolon(Tokens, D); in getDeclarationRange() [all …]
|
H A D | Tokens.cpp | 524 llvm::ArrayRef<syntax::Token> Tokens) { in spelledTokensTouching() argument 528 Tokens, [&](const syntax::Token &Tok) { return Tok.location() < Loc; }); in spelledTokensTouching() 529 bool AcceptRight = Right != Tokens.end() && Right->location() <= Loc; in spelledTokensTouching() 531 Right != Tokens.begin() && (Right - 1)->endLocation() >= Loc; in spelledTokensTouching() 538 const syntax::TokenBuffer &Tokens) { in spelledTokensTouching() argument 540 Loc, Tokens.spelledTokens(Tokens.sourceManager().getFileID(Loc))); in spelledTokensTouching() 545 llvm::ArrayRef<syntax::Token> Tokens) { in spelledIdentifierTouching() argument 546 for (const syntax::Token &Tok : spelledTokensTouching(Loc, Tokens)) { in spelledIdentifierTouching() 555 const syntax::TokenBuffer &Tokens) { in spelledIdentifierTouching() argument 557 Loc, Tokens.spelledTokens(Tokens.sourceManager().getFileID(Loc))); in spelledIdentifierTouching() [all …]
|
H A D | Synthesis.cpp | 43 auto Tokens = in createLeaf() local 46 assert(Tokens.size() == 1); in createLeaf() 47 assert(Tokens.front().kind() == K && in createLeaf() 51 reinterpret_cast<TokenManager::Key>(Tokens.begin())); in createLeaf()
|
/freebsd/contrib/llvm-project/llvm/lib/ExecutionEngine/JITLink/ |
H A D | COFFDirectiveParser.cpp | 55 SmallVector<StringRef, 16> Tokens; 57 cl::TokenizeWindowsCommandLineNoCopy(Str, saver, Tokens); 58 for (StringRef Tok : Tokens) { 65 SmallVector<StringRef, 16> Tokens; parse() local
|
/freebsd/contrib/llvm-project/lldb/source/Plugins/ObjectFile/Breakpad/ |
H A D | BreakpadRecords.cpp | 335 llvm::SmallVector<llvm::StringRef> Tokens; in parse() 336 SplitString(Line, Tokens, " "); in parse() 337 if (Tokens.size() < 6 || Tokens.size() % 2 == 1) in parse() 344 if (!(to_integer(Tokens[0], InlineNestLevel) && in parse() 345 to_integer(Tokens[1], CallSiteLineNum) && in parse() 346 to_integer(Tokens[2], CallSiteFileNum) && in parse() 347 to_integer(Tokens[3], OriginNum))) in parse() 352 for (size_t i = 4; i < Tokens.size(); i += 2) { in parse() 354 if (!to_integer(Tokens[ in parse() 334 llvm::SmallVector<llvm::StringRef> Tokens; parse() local [all...] |
/freebsd/contrib/llvm-project/llvm/lib/CodeGen/ |
H A D | IfConversion.cpp | 254 std::vector<std::unique_ptr<IfcvtToken>> &Tokens); 259 std::vector<std::unique_ptr<IfcvtToken>> &Tokens); 478 std::vector<std::unique_ptr<IfcvtToken>> Tokens; in INITIALIZE_PASS_DEPENDENCY() local 486 AnalyzeBlocks(MF, Tokens); in INITIALIZE_PASS_DEPENDENCY() 487 while (!Tokens.empty()) { in INITIALIZE_PASS_DEPENDENCY() 488 std::unique_ptr<IfcvtToken> Token = std::move(Tokens.back()); in INITIALIZE_PASS_DEPENDENCY() 489 Tokens.pop_back(); in INITIALIZE_PASS_DEPENDENCY() 595 Tokens.clear(); in INITIALIZE_PASS_DEPENDENCY() 1207 MachineBasicBlock &MBB, std::vector<std::unique_ptr<IfcvtToken>> &Tokens) { in AnalyzeBlock() argument 1317 Tokens.push_back(std::make_unique<IfcvtToken>( in AnalyzeBlock() [all …]
|