Lines Matching refs:Toks
120 CachedTokens Toks; in ParseCXXInlineMethodDef() local
121 LexTemplateFunctionForLateParsing(Toks); in ParseCXXInlineMethodDef()
126 Actions.MarkAsLateParsedTemplate(FD, FnD, Toks); in ParseCXXInlineMethodDef()
136 CachedTokens &Toks = LM->Toks; in ParseCXXInlineMethodDef() local
141 if (ConsumeAndStoreFunctionPrologue(Toks)) { in ParseCXXInlineMethodDef()
148 llvm::any_of(Toks, [](const Token &Tok) { in ParseCXXInlineMethodDef()
167 ConsumeAndStoreUntil(tok::r_brace, Toks, /*StopAtSemi=*/false); in ParseCXXInlineMethodDef()
173 ConsumeAndStoreUntil(tok::l_brace, Toks, /*StopAtSemi=*/false); in ParseCXXInlineMethodDef()
174 ConsumeAndStoreUntil(tok::r_brace, Toks, /*StopAtSemi=*/false); in ParseCXXInlineMethodDef()
205 CachedTokens &Toks = MI->Toks; in ParseCXXNonStaticMemberInitializer() local
209 Toks.push_back(Tok); in ParseCXXNonStaticMemberInitializer()
215 Toks.push_back(Tok); in ParseCXXNonStaticMemberInitializer()
219 ConsumeAndStoreUntil(tok::r_brace, Toks, /*StopAtSemi=*/true); in ParseCXXNonStaticMemberInitializer()
222 ConsumeAndStoreInitializer(Toks, CIK_DefaultInitializer); in ParseCXXNonStaticMemberInitializer()
232 Toks.push_back(Eof); in ParseCXXNonStaticMemberInitializer()
359 std::unique_ptr<CachedTokens> Toks = std::move(LM.DefaultArgs[I].Toks); in ParseLexedMethodDeclaration() local
360 if (Toks) { in ParseLexedMethodDeclaration()
365 Token LastDefaultArgToken = Toks->back(); in ParseLexedMethodDeclaration()
371 Toks->push_back(DefArgEnd); in ParseLexedMethodDeclaration()
374 Toks->push_back(Tok); // So that the current token doesn't get lost in ParseLexedMethodDeclaration()
375 PP.EnterTokenStream(*Toks, true, /*IsReinject*/ true); in ParseLexedMethodDeclaration()
404 assert(Toks->size() >= 3 && "expected a token in default arg"); in ParseLexedMethodDeclaration()
407 (*Toks)[Toks->size() - 3].getLocation()); in ParseLexedMethodDeclaration()
441 if (CachedTokens *Toks = LM.ExceptionSpecTokens) { in ParseLexedMethodDeclaration() local
445 Token LastExceptionSpecToken = Toks->back(); in ParseLexedMethodDeclaration()
451 Toks->push_back(ExceptionSpecEnd); in ParseLexedMethodDeclaration()
454 Toks->push_back(Tok); // So that the current token doesn't get lost in ParseLexedMethodDeclaration()
455 PP.EnterTokenStream(*Toks, true, /*IsReinject*/true); in ParseLexedMethodDeclaration()
511 delete Toks; in ParseLexedMethodDeclaration()
537 assert(!LM.Toks.empty() && "Empty body!"); in ParseLexedMethodDef()
538 Token LastBodyToken = LM.Toks.back(); in ParseLexedMethodDef()
544 LM.Toks.push_back(BodyEnd); in ParseLexedMethodDef()
547 LM.Toks.push_back(Tok); in ParseLexedMethodDef()
548 PP.EnterTokenStream(LM.Toks, true, /*IsReinject*/true); in ParseLexedMethodDef()
641 MI.Toks.push_back(Tok); in ParseLexedMemberInitializer()
642 PP.EnterTokenStream(MI.Toks, true, /*IsReinject*/true); in ParseLexedMemberInitializer()
712 AttrEnd.setEofData(LA.Toks.data()); in ParseLexedAttribute()
713 LA.Toks.push_back(AttrEnd); in ParseLexedAttribute()
717 LA.Toks.push_back(Tok); in ParseLexedAttribute()
718 PP.EnterTokenStream(LA.Toks, true, /*IsReinject=*/true); in ParseLexedAttribute()
814 CachedTokens &Toks, in ConsumeAndStoreUntil() argument
823 Toks.push_back(Tok); in ConsumeAndStoreUntil()
839 Toks.push_back(Tok); in ConsumeAndStoreUntil()
841 ConsumeAndStoreUntil(tok::r_paren, Toks, /*StopAtSemi=*/false); in ConsumeAndStoreUntil()
845 Toks.push_back(Tok); in ConsumeAndStoreUntil()
847 ConsumeAndStoreUntil(tok::r_square, Toks, /*StopAtSemi=*/false); in ConsumeAndStoreUntil()
851 Toks.push_back(Tok); in ConsumeAndStoreUntil()
853 ConsumeAndStoreUntil(tok::r_brace, Toks, /*StopAtSemi=*/false); in ConsumeAndStoreUntil()
864 Toks.push_back(Tok); in ConsumeAndStoreUntil()
870 Toks.push_back(Tok); in ConsumeAndStoreUntil()
876 Toks.push_back(Tok); in ConsumeAndStoreUntil()
886 Toks.push_back(Tok); in ConsumeAndStoreUntil()
900 bool Parser::ConsumeAndStoreFunctionPrologue(CachedTokens &Toks) { in ConsumeAndStoreFunctionPrologue() argument
902 Toks.push_back(Tok); in ConsumeAndStoreFunctionPrologue()
912 ConsumeAndStoreUntil(tok::l_brace, tok::r_brace, Toks, in ConsumeAndStoreFunctionPrologue()
918 Toks.push_back(Tok); in ConsumeAndStoreFunctionPrologue()
923 Toks.push_back(Tok); in ConsumeAndStoreFunctionPrologue()
941 Toks.push_back(Tok); in ConsumeAndStoreFunctionPrologue()
946 Toks.push_back(Tok); in ConsumeAndStoreFunctionPrologue()
948 if (!ConsumeAndStoreUntil(tok::r_paren, Toks, /*StopAtSemi=*/true)) { in ConsumeAndStoreFunctionPrologue()
957 Toks.push_back(Tok); in ConsumeAndStoreFunctionPrologue()
961 Toks.push_back(Tok); in ConsumeAndStoreFunctionPrologue()
967 Toks.push_back(Tok); in ConsumeAndStoreFunctionPrologue()
975 Toks.push_back(Tok); in ConsumeAndStoreFunctionPrologue()
986 Toks.push_back(Tok); in ConsumeAndStoreFunctionPrologue()
1000 if (!ConsumeAndStoreUntil(tok::l_paren, tok::l_brace, Toks, in ConsumeAndStoreFunctionPrologue()
1017 Toks.push_back(Tok); in ConsumeAndStoreFunctionPrologue()
1031 const Token &PreviousToken = Toks[Toks.size() - 2]; in ConsumeAndStoreFunctionPrologue()
1056 if (!ConsumeAndStoreUntil(CloseKind, Toks, /*StopAtSemi=*/true)) { in ConsumeAndStoreFunctionPrologue()
1064 Toks.push_back(Tok); in ConsumeAndStoreFunctionPrologue()
1071 Toks.push_back(Tok); in ConsumeAndStoreFunctionPrologue()
1088 Toks.push_back(Tok); in ConsumeAndStoreFunctionPrologue()
1100 bool Parser::ConsumeAndStoreConditional(CachedTokens &Toks) { in ConsumeAndStoreConditional() argument
1103 Toks.push_back(Tok); in ConsumeAndStoreConditional()
1107 if (!ConsumeAndStoreUntil(tok::question, tok::colon, Toks, in ConsumeAndStoreConditional()
1113 if (Tok.is(tok::question) && !ConsumeAndStoreConditional(Toks)) in ConsumeAndStoreConditional()
1118 Toks.push_back(Tok); in ConsumeAndStoreConditional()
1132 Self.ConsumeAndStoreUntil(EndKind, Toks, true, /*ConsumeFinalToken*/false); in UnannotatedTentativeParsingAction()
1141 if (Toks.size()) { in RevertAnnotations()
1142 auto Buffer = std::make_unique<Token[]>(Toks.size()); in RevertAnnotations()
1143 std::copy(Toks.begin() + 1, Toks.end(), Buffer.get()); in RevertAnnotations()
1144 Buffer[Toks.size() - 1] = Self.Tok; in RevertAnnotations()
1145 Self.PP.EnterTokenStream(std::move(Buffer), Toks.size(), true, in RevertAnnotations()
1148 Self.Tok = Toks.front(); in RevertAnnotations()
1154 CachedTokens Toks; member in Parser::UnannotatedTentativeParsingAction
1164 bool Parser::ConsumeAndStoreInitializer(CachedTokens &Toks, in ConsumeAndStoreInitializer() argument
1252 if (!ConsumeAndStoreConditional(Toks)) in ConsumeAndStoreInitializer()
1277 Toks.push_back(Tok); in ConsumeAndStoreInitializer()
1280 Toks.push_back(Tok); in ConsumeAndStoreInitializer()
1285 Toks.push_back(Tok); in ConsumeAndStoreInitializer()
1294 Toks.push_back(Tok); in ConsumeAndStoreInitializer()
1302 Toks.push_back(Tok); in ConsumeAndStoreInitializer()
1312 Toks.push_back(Tok); in ConsumeAndStoreInitializer()
1314 ConsumeAndStoreUntil(tok::r_paren, Toks, /*StopAtSemi=*/false); in ConsumeAndStoreInitializer()
1318 Toks.push_back(Tok); in ConsumeAndStoreInitializer()
1320 ConsumeAndStoreUntil(tok::r_square, Toks, /*StopAtSemi=*/false); in ConsumeAndStoreInitializer()
1324 Toks.push_back(Tok); in ConsumeAndStoreInitializer()
1326 ConsumeAndStoreUntil(tok::r_brace, Toks, /*StopAtSemi=*/false); in ConsumeAndStoreInitializer()
1340 Toks.push_back(Tok); in ConsumeAndStoreInitializer()
1346 Toks.push_back(Tok); in ConsumeAndStoreInitializer()
1352 Toks.push_back(Tok); in ConsumeAndStoreInitializer()
1357 Toks.push_back(Tok); in ConsumeAndStoreInitializer()
1366 Toks.push_back(Tok); in ConsumeAndStoreInitializer()
1375 Toks.push_back(Tok); in ConsumeAndStoreInitializer()