Lines Matching refs:Tok

29   assert(Tok.isOneOf(tok::l_brace, tok::colon, tok::kw_try, tok::equal) &&  in ParseCXXInlineMethodDef()
65 SourceLocation KWEndLoc = Tok.getEndLoc().getLocWithOffset(-1); in ParseCXXInlineMethodDef()
89 if (Tok.is(tok::comma)) { in ParseCXXInlineMethodDef()
138 tok::TokenKind kind = Tok.getKind(); in ParseCXXInlineMethodDef()
148 llvm::any_of(Toks, [](const Token &Tok) { in ParseCXXInlineMethodDef() argument
149 return Tok.is(tok::code_completion); in ParseCXXInlineMethodDef()
172 while (Tok.is(tok::kw_catch)) { in ParseCXXInlineMethodDef()
199 assert(Tok.isOneOf(tok::l_brace, tok::equal) && in ParseCXXNonStaticMemberInitializer()
207 tok::TokenKind kind = Tok.getKind(); in ParseCXXNonStaticMemberInitializer()
209 Toks.push_back(Tok); in ParseCXXNonStaticMemberInitializer()
215 Toks.push_back(Tok); in ParseCXXNonStaticMemberInitializer()
230 Eof.setLocation(Tok.getLocation()); in ParseCXXNonStaticMemberInitializer()
374 Toks->push_back(Tok); // So that the current token doesn't get lost in ParseLexedMethodDeclaration()
381 assert(Tok.is(tok::equal) && "Default argument not starting with '='"); in ParseLexedMethodDeclaration()
391 if (getLangOpts().CPlusPlus11 && Tok.is(tok::l_brace)) { in ParseLexedMethodDeclaration()
392 Diag(Tok, diag::warn_cxx98_compat_generalized_initializer_lists); in ParseLexedMethodDeclaration()
400 if (Tok.isNot(tok::eof) || Tok.getEofData() != Param) { in ParseLexedMethodDeclaration()
405 Diag(Tok.getLocation(), diag::err_default_arg_unparsed) in ParseLexedMethodDeclaration()
406 << SourceRange(Tok.getLocation(), in ParseLexedMethodDeclaration()
415 while (Tok.isNot(tok::eof)) in ParseLexedMethodDeclaration()
418 if (Tok.is(tok::eof) && Tok.getEofData() == Param) in ParseLexedMethodDeclaration()
454 Toks->push_back(Tok); // So that the current token doesn't get lost in ParseLexedMethodDeclaration()
491 if (Tok.isNot(tok::eof) || Tok.getEofData() != LM.Method) in ParseLexedMethodDeclaration()
492 Diag(Tok.getLocation(), diag::err_except_spec_unparsed); in ParseLexedMethodDeclaration()
504 while (Tok.isNot(tok::eof)) in ParseLexedMethodDeclaration()
508 if (Tok.is(tok::eof) && Tok.getEofData() == LM.Method) in ParseLexedMethodDeclaration()
547 LM.Toks.push_back(Tok); in ParseLexedMethodDef()
552 assert(Tok.isOneOf(tok::l_brace, tok::colon, tok::kw_try) in ParseLexedMethodDef()
561 if (Tok.is(tok::kw_try)) { in ParseLexedMethodDef()
564 while (Tok.isNot(tok::eof)) in ParseLexedMethodDef()
567 if (Tok.is(tok::eof) && Tok.getEofData() == LM.D) in ParseLexedMethodDef()
571 if (Tok.is(tok::colon)) { in ParseLexedMethodDef()
575 if (!Tok.is(tok::l_brace)) { in ParseLexedMethodDef()
579 while (Tok.isNot(tok::eof)) in ParseLexedMethodDef()
582 if (Tok.is(tok::eof) && Tok.getEofData() == LM.D) in ParseLexedMethodDef()
598 while (Tok.isNot(tok::eof)) in ParseLexedMethodDef()
601 if (Tok.is(tok::eof) && Tok.getEofData() == LM.D) in ParseLexedMethodDef()
641 MI.Toks.push_back(Tok); in ParseLexedMemberInitializer()
658 if (Tok.isNot(tok::eof)) { in ParseLexedMemberInitializer()
662 EndLoc = Tok.getLocation(); in ParseLexedMemberInitializer()
668 while (Tok.isNot(tok::eof)) in ParseLexedMemberInitializer()
672 if (Tok.getEofData() == MI.Field) in ParseLexedMemberInitializer()
711 AttrEnd.setLocation(Tok.getLocation()); in ParseLexedAttribute()
717 LA.Toks.push_back(Tok); in ParseLexedAttribute()
759 Diag(Tok, diag::warn_attribute_no_decl) << LA.AttrName.getName(); in ParseLexedAttribute()
764 Diag(Tok, diag::warn_attribute_on_function_definition) in ParseLexedAttribute()
772 while (Tok.isNot(tok::eof)) in ParseLexedAttribute()
775 if (Tok.is(tok::eof) && Tok.getEofData() == AttrEnd.getEofData()) in ParseLexedAttribute()
787 PP.EnterToken(Tok, /*IsReinject=*/true); in ParseLexedPragma()
793 assert(Tok.isAnnotation() && "Expected annotation token."); in ParseLexedPragma()
794 switch (Tok.getKind()) { in ParseLexedPragma()
821 if (Tok.is(T1) || Tok.is(T2)) { in ConsumeAndStoreUntil()
823 Toks.push_back(Tok); in ConsumeAndStoreUntil()
829 switch (Tok.getKind()) { in ConsumeAndStoreUntil()
839 Toks.push_back(Tok); in ConsumeAndStoreUntil()
845 Toks.push_back(Tok); in ConsumeAndStoreUntil()
851 Toks.push_back(Tok); 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()
901 if (Tok.is(tok::kw_try)) { in ConsumeAndStoreFunctionPrologue()
902 Toks.push_back(Tok); in ConsumeAndStoreFunctionPrologue()
906 if (Tok.isNot(tok::colon)) { in ConsumeAndStoreFunctionPrologue()
915 if (Tok.isNot(tok::l_brace)) in ConsumeAndStoreFunctionPrologue()
916 return Diag(Tok.getLocation(), diag::err_expected) << tok::l_brace; in ConsumeAndStoreFunctionPrologue()
918 Toks.push_back(Tok); in ConsumeAndStoreFunctionPrologue()
923 Toks.push_back(Tok); in ConsumeAndStoreFunctionPrologue()
940 if (Tok.is(tok::kw_decltype)) { in ConsumeAndStoreFunctionPrologue()
941 Toks.push_back(Tok); in ConsumeAndStoreFunctionPrologue()
943 if (Tok.isNot(tok::l_paren)) in ConsumeAndStoreFunctionPrologue()
944 return Diag(Tok.getLocation(), diag::err_expected_lparen_after) in ConsumeAndStoreFunctionPrologue()
946 Toks.push_back(Tok); in ConsumeAndStoreFunctionPrologue()
949 Diag(Tok.getLocation(), diag::err_expected) << tok::r_paren; in ConsumeAndStoreFunctionPrologue()
956 if (Tok.is(tok::coloncolon)) { in ConsumeAndStoreFunctionPrologue()
957 Toks.push_back(Tok); in ConsumeAndStoreFunctionPrologue()
960 if (Tok.is(tok::kw_template)) { in ConsumeAndStoreFunctionPrologue()
961 Toks.push_back(Tok); in ConsumeAndStoreFunctionPrologue()
966 if (Tok.is(tok::identifier)) { in ConsumeAndStoreFunctionPrologue()
967 Toks.push_back(Tok); in ConsumeAndStoreFunctionPrologue()
972 } while (Tok.is(tok::coloncolon)); in ConsumeAndStoreFunctionPrologue()
974 if (Tok.is(tok::code_completion)) { in ConsumeAndStoreFunctionPrologue()
975 Toks.push_back(Tok); in ConsumeAndStoreFunctionPrologue()
977 if (Tok.isOneOf(tok::identifier, tok::coloncolon, tok::kw_decltype)) { in ConsumeAndStoreFunctionPrologue()
984 if (Tok.is(tok::comma)) { in ConsumeAndStoreFunctionPrologue()
986 Toks.push_back(Tok); in ConsumeAndStoreFunctionPrologue()
990 if (Tok.is(tok::less)) in ConsumeAndStoreFunctionPrologue()
1005 return Diag(Tok.getLocation(), diag::err_expected) << tok::l_brace; in ConsumeAndStoreFunctionPrologue()
1007 } else if (Tok.isNot(tok::l_paren) && Tok.isNot(tok::l_brace)) { in ConsumeAndStoreFunctionPrologue()
1010 return Diag(Tok.getLocation(), diag::err_expected_either) in ConsumeAndStoreFunctionPrologue()
1013 return Diag(Tok.getLocation(), diag::err_expected) << tok::l_paren; in ConsumeAndStoreFunctionPrologue()
1016 tok::TokenKind kind = Tok.getKind(); in ConsumeAndStoreFunctionPrologue()
1017 Toks.push_back(Tok); in ConsumeAndStoreFunctionPrologue()
1019 SourceLocation OpenLoc = Tok.getLocation(); in ConsumeAndStoreFunctionPrologue()
1042 !Tok.isOneOf(tok::comma, tok::ellipsis, tok::l_brace)) { in ConsumeAndStoreFunctionPrologue()
1057 Diag(Tok, diag::err_expected) << CloseKind; in ConsumeAndStoreFunctionPrologue()
1063 if (Tok.is(tok::ellipsis)) { in ConsumeAndStoreFunctionPrologue()
1064 Toks.push_back(Tok); in ConsumeAndStoreFunctionPrologue()
1070 if (Tok.is(tok::comma)) { in ConsumeAndStoreFunctionPrologue()
1071 Toks.push_back(Tok); in ConsumeAndStoreFunctionPrologue()
1073 } else if (Tok.is(tok::l_brace)) { in ConsumeAndStoreFunctionPrologue()
1088 Toks.push_back(Tok); in ConsumeAndStoreFunctionPrologue()
1092 return Diag(Tok.getLocation(), diag::err_expected_either) << tok::l_brace in ConsumeAndStoreFunctionPrologue()
1102 assert(Tok.is(tok::question)); in ConsumeAndStoreConditional()
1103 Toks.push_back(Tok); in ConsumeAndStoreConditional()
1106 while (Tok.isNot(tok::colon)) { in ConsumeAndStoreConditional()
1113 if (Tok.is(tok::question) && !ConsumeAndStoreConditional(Toks)) in ConsumeAndStoreConditional()
1118 Toks.push_back(Tok); in ConsumeAndStoreConditional()
1144 Buffer[Toks.size() - 1] = Self.Tok; in RevertAnnotations()
1148 Self.Tok = Toks.front(); in RevertAnnotations()
1176 switch (Tok.getKind()) { in ConsumeAndStoreInitializer()
1207 if (Result == TPResult::Ambiguous && Tok.isNot(tok::semi)) in ConsumeAndStoreInitializer()
1277 Toks.push_back(Tok); in ConsumeAndStoreInitializer()
1279 if (Tok.is(tok::identifier)) { in ConsumeAndStoreInitializer()
1280 Toks.push_back(Tok); in ConsumeAndStoreInitializer()
1282 if (Tok.is(tok::less)) { in ConsumeAndStoreInitializer()
1285 Toks.push_back(Tok); in ConsumeAndStoreInitializer()
1294 Toks.push_back(Tok); in ConsumeAndStoreInitializer()
1296 switch (Tok.getKind()) { in ConsumeAndStoreInitializer()
1302 Toks.push_back(Tok); in ConsumeAndStoreInitializer()
1312 Toks.push_back(Tok); in ConsumeAndStoreInitializer()
1318 Toks.push_back(Tok); in ConsumeAndStoreInitializer()
1324 Toks.push_back(Tok); 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()