Home
last modified time | relevance | path

Searched refs:Toks (Results 1 – 22 of 22) sorted by relevance

/external/clang/unittests/AST/
DCommentLexer.cpp46 void lexString(const char *Source, std::vector<Token> &Toks);
62 std::vector<Token> &Toks) { in lexString() argument
74 Toks.push_back(Tok); in lexString()
83 std::vector<Token> Toks; in TEST_F() local
85 lexString(Source, Toks); in TEST_F()
87 ASSERT_EQ(0U, Toks.size()); in TEST_F()
96 std::vector<Token> Toks; in TEST_F() local
98 lexString(Sources[i], Toks); in TEST_F()
100 ASSERT_EQ(1U, Toks.size()); in TEST_F()
102 ASSERT_EQ(tok::newline, Toks[0].getKind()); in TEST_F()
[all …]
/external/clang/lib/Parse/
DParseCXXInlineMethods.cpp116 CachedTokens Toks; in ParseCXXInlineMethodDef() local
117 LexTemplateFunctionForLateParsing(Toks); in ParseCXXInlineMethodDef()
122 Actions.MarkAsLateParsedTemplate(FD, FnD, Toks); in ParseCXXInlineMethodDef()
133 CachedTokens &Toks = LM->Toks; in ParseCXXInlineMethodDef() local
138 if (ConsumeAndStoreFunctionPrologue(Toks)) { in ParseCXXInlineMethodDef()
150 ConsumeAndStoreUntil(tok::r_brace, Toks, /*StopAtSemi=*/false); in ParseCXXInlineMethodDef()
156 ConsumeAndStoreUntil(tok::l_brace, Toks, /*StopAtSemi=*/false); in ParseCXXInlineMethodDef()
157 ConsumeAndStoreUntil(tok::r_brace, Toks, /*StopAtSemi=*/false); in ParseCXXInlineMethodDef()
197 CachedTokens &Toks = MI->Toks; in ParseCXXNonStaticMemberInitializer() local
201 Toks.push_back(Tok); in ParseCXXNonStaticMemberInitializer()
[all …]
DParsePragma.cpp717 Token Toks[1]; in HandlePragmaMSInitSeg() local
718 Toks[0].startToken(); in HandlePragmaMSInitSeg()
719 Toks[0].setKind(tok::string_literal); in HandlePragmaMSInitSeg()
720 Toks[0].setLocation(Tok.getLocation()); in HandlePragmaMSInitSeg()
721 Toks[0].setLiteralData(Section.data()); in HandlePragmaMSInitSeg()
722 Toks[0].setLength(Section.size()); in HandlePragmaMSInitSeg()
724 cast<StringLiteral>(Actions.ActOnStringLiteral(Toks, nullptr).get()); in HandlePragmaMSInitSeg()
759 ArrayRef<Token> Toks; member
793 const Token *Toks = Info->Toks.data(); in HandlePragmaLoopHint() local
794 size_t TokSize = Info->Toks.size(); in HandlePragmaLoopHint()
[all …]
DParseTemplate.cpp1352 assert(!LPT.Toks.empty() && "Empty body!"); in ParseLateTemplatedFuncDef()
1356 LPT.Toks.push_back(Tok); in ParseLateTemplatedFuncDef()
1357 PP.EnterTokenStream(LPT.Toks.data(), LPT.Toks.size(), true, false); in ParseLateTemplatedFuncDef()
1404 void Parser::LexTemplateFunctionForLateParsing(CachedTokens &Toks) { in LexTemplateFunctionForLateParsing() argument
1406 if (!ConsumeAndStoreFunctionPrologue(Toks)) { in LexTemplateFunctionForLateParsing()
1408 ConsumeAndStoreUntil(tok::r_brace, Toks, /*StopAtSemi=*/false); in LexTemplateFunctionForLateParsing()
1414 ConsumeAndStoreUntil(tok::l_brace, Toks, /*StopAtSemi=*/false); in LexTemplateFunctionForLateParsing()
1415 ConsumeAndStoreUntil(tok::r_brace, Toks, /*StopAtSemi=*/false); in LexTemplateFunctionForLateParsing()
DParseObjc.cpp2607 CachedTokens &Toks = LM->Toks; in StashAwayMethodOrFunctionBodyTokens() local
2609 Toks.push_back(Tok); in StashAwayMethodOrFunctionBodyTokens()
2613 Toks.push_back(Tok); in StashAwayMethodOrFunctionBodyTokens()
2616 ConsumeAndStoreUntil(tok::l_paren, Toks, /*StopAtSemi=*/false); in StashAwayMethodOrFunctionBodyTokens()
2617 ConsumeAndStoreUntil(tok::r_paren, Toks, /*StopAtSemi=*/false); in StashAwayMethodOrFunctionBodyTokens()
2620 Toks.push_back(Tok); // also store '{' in StashAwayMethodOrFunctionBodyTokens()
2626 ConsumeAndStoreUntil(tok::l_paren, Toks, /*StopAtSemi=*/false); in StashAwayMethodOrFunctionBodyTokens()
2627 ConsumeAndStoreUntil(tok::r_paren, Toks, /*StopAtSemi=*/false); in StashAwayMethodOrFunctionBodyTokens()
2629 Toks.push_back(Tok); // also store '{' in StashAwayMethodOrFunctionBodyTokens()
2633 ConsumeAndStoreUntil(tok::r_brace, Toks, /*StopAtSemi=*/false); in StashAwayMethodOrFunctionBodyTokens()
[all …]
DParser.cpp252 bool Parser::SkipUntil(ArrayRef<tok::TokenKind> Toks, SkipUntilFlags Flags) { in SkipUntil() argument
258 for (unsigned i = 0, NumToks = Toks.size(); i != NumToks; ++i) { in SkipUntil()
259 if (Tok.is(Toks[i])) { in SkipUntil()
272 if (Toks.size() == 1 && Toks[0] == tok::eof && in SkipUntil()
1034 CachedTokens Toks; in ParseFunctionDefinition() local
1035 LexTemplateFunctionForLateParsing(Toks); in ParseFunctionDefinition()
1040 Actions.MarkAsLateParsedTemplate(FnD, DP, Toks); in ParseFunctionDefinition()
DParseExprCXX.cpp2258 SmallVector<Token, 4> Toks; in ParseUnqualifiedIdOperator() local
2268 Toks.push_back(Tok); in ParseUnqualifiedIdOperator()
2272 StringLiteralParser Literal(Toks, PP); in ParseUnqualifiedIdOperator()
3054 CachedTokens Toks; in ParseCXXAmbiguousParenExpression() local
3058 if (!ConsumeAndStoreUntil(tok::r_paren, Toks)) { in ParseCXXAmbiguousParenExpression()
3088 Toks.push_back(Tok); in ParseCXXAmbiguousParenExpression()
3091 PP.EnterTokenStream(Toks.data(), Toks.size(), in ParseCXXAmbiguousParenExpression()
DParseStmtAsm.cpp50 ArrayRef<Token> Toks, ArrayRef<unsigned> Offsets) in ClangAsmParserCallback() argument
51 : TheParser(P), AsmLoc(Loc), AsmString(AsmString), AsmToks(Toks), in ClangAsmParserCallback()
DParseDecl.cpp179 ConsumeAndStoreUntil(tok::r_paren, LA->Toks, true, false); in ParseGNUAttributes()
184 LA->Toks.push_back(Eof); in ParseGNUAttributes()
1184 AttrEnd.setEofData(LA.Toks.data()); in ParseLexedAttribute()
1185 LA.Toks.push_back(AttrEnd); in ParseLexedAttribute()
1189 LA.Toks.push_back(Tok); in ParseLexedAttribute()
1190 PP.EnterTokenStream(LA.Toks.data(), LA.Toks.size(), true, false); in ParseLexedAttribute()
/external/clang/include/clang/AST/
DCommentParser.h73 void putBack(ArrayRef<Token> Toks) { in putBack() argument
74 if (Toks.empty()) in putBack()
78 MoreLATokens.append(Toks.rbegin(), std::prev(Toks.rend())); in putBack()
80 Tok = Toks[0]; in putBack()
/external/clang/lib/Lex/
DPPLexerChange.cpp191 void Preprocessor::EnterTokenStream(const Token *Toks, unsigned NumToks, in EnterTokenStream() argument
199 Toks, Toks + NumToks); in EnterTokenStream()
201 delete [] Toks; in EnterTokenStream()
208 EnterTokenStream(Toks, NumToks, DisableMacroExpansion, OwnsTokens); in EnterTokenStream()
217 Toks, NumToks, DisableMacroExpansion, OwnsTokens, *this); in EnterTokenStream()
220 TokLexer->Init(Toks, NumToks, DisableMacroExpansion, OwnsTokens); in EnterTokenStream()
DPragma.cpp924 Token *Toks = PP.getPreprocessorAllocator().Allocate<Token>(1); in HandleCaptured() local
925 Toks->startToken(); in HandleCaptured()
926 Toks->setKind(tok::annot_pragma_captured); in HandleCaptured()
927 Toks->setLocation(NameLoc); in HandleCaptured()
929 PP.EnterTokenStream(Toks, 1, /*DisableMacroExpansion=*/true, in HandleCaptured()
DPPDirectives.cpp910 Token *Toks = new Token[2]; in HandleDirective() local
912 Toks[0] = SavedHash; in HandleDirective()
913 Toks[1] = Result; in HandleDirective()
918 Toks[1].setKind(tok::unknown); in HandleDirective()
923 EnterTokenStream(Toks, 2, false, true); in HandleDirective()
DPPMacroExpansion.cpp761 Token *Toks = new Token[1]; in ReadFunctionLikeMacroArgs() local
762 Toks[0] = Tok; in ReadFunctionLikeMacroArgs()
763 EnterTokenStream(Toks, 1, true, true); in ReadFunctionLikeMacroArgs()
/external/clang/lib/AST/
DCommentParser.cpp39 SmallVector<Token, 16> Toks; member in clang::comments::TextTokenRetokenizer
54 return Pos.CurToken >= Toks.size(); in isEnd()
60 const Token &Tok = Toks[Pos.CurToken]; in setupBuffer()
115 Toks.push_back(P.Tok); in addToken()
117 if (Toks.size() == 1) in addToken()
249 P.putBack(llvm::makeArrayRef(Toks.begin() + Pos.CurToken, Toks.end())); in putBackLeftoverTokens()
250 Pos.CurToken = Toks.size(); in putBackLeftoverTokens()
/external/clang/include/clang/Parse/
DParser.h876 bool SkipUntil(ArrayRef<tok::TokenKind> Toks,
932 CachedTokens Toks; member
963 CachedTokens Toks; member
982 CachedTokens *Toks = nullptr)
983 : Param(P), Toks(Toks) { } in Param()
992 CachedTokens *Toks; member
1044 CachedTokens Toks; member
1170 void LexTemplateFunctionForLateParsing(CachedTokens &Toks);
1205 bool ConsumeAndStoreFunctionPrologue(CachedTokens &Toks);
1206 bool ConsumeAndStoreInitializer(CachedTokens &Toks, CachedInitKind CIK);
[all …]
/external/clang/include/clang/Lex/
DPreprocessor.h1022 void EnterTokenStream(const Token *Toks, unsigned NumToks,
/external/clang/lib/Sema/
DSemaDeclCXX.cpp397 CachedTokens *Toks = chunk.Fun.Params[argIdx].DefaultArgTokens; in CheckExtraCXXDefaultArguments() local
399 if (Toks->size() > 1) in CheckExtraCXXDefaultArguments()
400 SR = SourceRange((*Toks)[1].getLocation(), in CheckExtraCXXDefaultArguments()
401 Toks->back().getLocation()); in CheckExtraCXXDefaultArguments()
406 delete Toks; in CheckExtraCXXDefaultArguments()
DSemaTemplate.cpp8432 CachedTokens &Toks) { in MarkAsLateParsedTemplate() argument
8439 LPT->Toks.swap(Toks); in MarkAsLateParsedTemplate()
/external/clang/lib/Serialization/
DASTWriter.cpp3866 Record.push_back(LPT->Toks.size()); in WriteLateParsedTemplates()
3868 for (const auto &Tok : LPT->Toks) { in WriteLateParsedTemplates()
DASTReader.cpp7334 LT->Toks.reserve(TokN); in ReadLateParsedTemplates()
7336 LT->Toks.push_back(ReadToken(*F, LateParsedTemplates, Idx)); in ReadLateParsedTemplates()
/external/clang/include/clang/Sema/
DSema.h5314 CachedTokens &Toks);
9261 CachedTokens Toks; member