Lines Matching refs:Tok
42 auto Tok = P.getCurToken();
44 Tok.isAnnotation()
46 : getOpenMPDirectiveKind(P.getPreprocessor().getSpelling(Tok));
50 if (!Tok.isAnnotation() && DKind == OMPD_unknown) {
53 !P.getPreprocessor().getSpelling(Tok).compare("cancellation");
59 Tok = P.getPreprocessor().LookAhead(0);
60 auto TokenIsAnnotation = Tok.isAnnotation();
64 : getOpenMPDirectiveKind(P.getPreprocessor().getSpelling(Tok));
69 !P.getPreprocessor().getSpelling(Tok).compare("point")) ||
70 ((i == 1) && !P.getPreprocessor().getSpelling(Tok).compare("data"));
90 assert(Tok.is(tok::annot_pragma_openmp) && "Not an OpenMP directive!");
103 if (Tok.isNot(tok::annot_pragma_openmp_end)) {
104 Diag(Tok, diag::warn_omp_extra_tokens_at_eol)
106 SkipUntil(tok::annot_pragma_openmp_end, StopBeforeMatch);
114 Diag(Tok, diag::err_omp_unknown_directive);
144 Diag(Tok, diag::err_omp_unexpected_directive)
148 SkipUntil(tok::annot_pragma_openmp_end);
170 assert(Tok.is(tok::annot_pragma_openmp) && "Not an OpenMP directive!");
193 if (Tok.isNot(tok::annot_pragma_openmp_end)) {
194 Diag(Tok, diag::warn_omp_extra_tokens_at_eol)
196 SkipUntil(tok::annot_pragma_openmp_end, StopBeforeMatch);
200 Directive = Actions.ActOnDeclStmt(Res, Loc, Tok.getLocation());
202 SkipUntil(tok::annot_pragma_openmp_end);
205 if (PP.LookAhead(0).is(tok::l_paren)) {
209 PP.EnterToken(Tok);
217 Diag(Tok, diag::err_omp_immediate_directive)
247 BalancedDelimiterTracker T(*this, tok::l_paren,
248 tok::annot_pragma_openmp_end);
250 if (Tok.isAnyIdentifier()) {
252 DeclarationNameInfo(Tok.getIdentifierInfo(), Tok.getLocation());
255 Diag(Tok, diag::err_omp_expected_identifier_for_critical);
261 if (Tok.isNot(tok::annot_pragma_openmp_end))
272 while (Tok.isNot(tok::annot_pragma_openmp_end)) {
274 Tok.isAnnotation()
277 : getOpenMPClauseKind(PP.getSpelling(Tok));
289 if (Tok.is(tok::comma))
294 EndLoc = Tok.getLocation();
331 Diag(Tok, diag::err_omp_unknown_directive);
332 SkipUntil(tok::annot_pragma_openmp_end);
349 BalancedDelimiterTracker T(*this, tok::l_paren, tok::annot_pragma_openmp_end);
357 while (Tok.isNot(tok::r_paren) && Tok.isNot(tok::annot_pragma_openmp_end)) {
362 Token PrevTok = Tok;
368 SkipUntil(tok::comma, tok::r_paren, tok::annot_pragma_openmp_end,
373 SkipUntil(tok::comma, tok::r_paren, tok::annot_pragma_openmp_end,
375 } else if (Tok.isNot(tok::comma) && Tok.isNot(tok::r_paren) &&
376 Tok.isNot(tok::annot_pragma_openmp_end)) {
378 SkipUntil(tok::comma, tok::r_paren, tok::annot_pragma_openmp_end,
381 << tok::identifier
391 if (Tok.is(tok::comma)) {
397 Diag(Tok, diag::err_expected) << tok::identifier;
427 Diag(Tok, diag::err_omp_unexpected_clause) << getOpenMPClauseName(CKind)
467 Diag(Tok, diag::err_omp_more_one_clause)
472 if (CKind == OMPC_ordered && PP.LookAhead(/*N=*/0).isNot(tok::l_paren))
485 Diag(Tok, diag::err_omp_more_one_clause)
496 Diag(Tok, diag::err_omp_more_one_clause)
520 Diag(Tok, diag::err_omp_more_one_clause)
542 Diag(Tok, diag::warn_omp_extra_tokens_at_eol)
544 SkipUntil(tok::annot_pragma_openmp_end, StopBeforeMatch);
547 Diag(Tok, diag::err_omp_unexpected_clause) << getOpenMPClauseName(CKind)
549 SkipUntil(tok::comma, tok::annot_pragma_openmp_end, StopBeforeMatch);
589 BalancedDelimiterTracker T(*this, tok::l_paren, tok::annot_pragma_openmp_end);
594 SourceLocation ELoc = Tok.getLocation();
618 SourceLocation Loc = Tok.getLocation();
621 BalancedDelimiterTracker T(*this, tok::l_paren, tok::annot_pragma_openmp_end);
627 Kind, Tok.isAnnotation() ? "" : PP.getSpelling(Tok));
628 SourceLocation TypeLoc = Tok.getLocation();
629 if (Tok.isNot(tok::r_paren) && Tok.isNot(tok::comma) &&
630 Tok.isNot(tok::annot_pragma_openmp_end))
637 Tok.getLocation());
667 SourceLocation Loc = Tok.getLocation();
670 return Actions.ActOnOpenMPClause(Kind, Loc, Tok.getLocation());
687 BalancedDelimiterTracker T(*this, tok::l_paren, tok::annot_pragma_openmp_end);
697 Kind, Tok.isAnnotation() ? "" : PP.getSpelling(Tok));
698 KLoc = Tok.getLocation();
699 if (Tok.isNot(tok::r_paren) && Tok.isNot(tok::comma) &&
700 Tok.isNot(tok::annot_pragma_openmp_end))
704 Tok.is(tok::comma))
708 KLoc = Tok.getLocation();
712 if (Tok.is(tok::colon))
715 Diag(Tok, diag::warn_pragma_expected_colon)
723 SourceLocation ELoc = Tok.getLocation();
746 case tok::plus:
749 case tok::minus:
752 case tok::star:
755 case tok::amp:
758 case tok::pipe:
761 case tok::caret:
764 case tok::ampamp:
767 case tok::pipepipe:
819 SourceLocation Loc = Tok.getLocation();
837 BalancedDelimiterTracker T(*this, tok::l_paren, tok::annot_pragma_openmp_end);
843 BalancedDelimiterTracker LinearT(*this, tok::l_paren,
844 tok::annot_pragma_openmp_end);
854 SkipUntil(tok::colon, tok::r_paren, tok::annot_pragma_openmp_end,
857 if (Tok.is(tok::colon)) {
860 Diag(Tok, diag::warn_pragma_expected_colon) << "reduction identifier";
866 Kind, Tok.is(tok::identifier) ? PP.getSpelling(Tok) : ""));
867 DepLinMapLoc = Tok.getLocation();
870 SkipUntil(tok::colon, tok::r_paren, tok::annot_pragma_openmp_end,
880 /*ColonLoc=*/SourceLocation(), Tok.getLocation(),
885 if (Tok.is(tok::colon)) {
888 Diag(Tok, DKind == OMPD_ordered ? diag::warn_pragma_expected_colon_r_paren
894 if (Tok.is(tok::identifier) && PP.LookAhead(0).is(tok::l_paren)) {
896 getOpenMPSimpleClauseType(Kind, PP.getSpelling(Tok)));
908 Kind, Tok.is(tok::identifier) ? PP.getSpelling(Tok) : ""));
909 DepLinMapLoc = Tok.getLocation();
912 if (Tok.is(tok::identifier)) {
913 if (PP.LookAhead(0).is(tok::colon)) {
915 Kind, Tok.is(tok::identifier) ? PP.getSpelling(Tok) : ""));
917 Diag(Tok, diag::err_omp_unknown_map_type);
919 Diag(Tok, diag::err_omp_map_type_missing);
922 } else if (PP.LookAhead(0).is(tok::comma)) {
923 if (PP.LookAhead(1).is(tok::identifier) &&
924 PP.LookAhead(2).is(tok::colon)) {
927 Kind, Tok.is(tok::identifier) ? PP.getSpelling(Tok) : ""));
929 Diag(Tok, diag::err_omp_unknown_map_type_modifier);
939 Kind, Tok.is(tok::identifier) ? PP.getSpelling(Tok) : ""));
941 Diag(Tok, diag::err_omp_unknown_map_type);
954 if (Tok.is(tok::colon)) {
957 Diag(Tok, diag::warn_pragma_expected_colon) << "map type";
971 while (IsComma || (Tok.isNot(tok::r_paren) && Tok.isNot(tok::colon) &&
972 Tok.isNot(tok::annot_pragma_openmp_end))) {
980 SkipUntil(tok::comma, tok::r_paren, tok::annot_pragma_openmp_end,
984 IsComma = Tok.is(tok::comma);
987 else if (Tok.isNot(tok::r_paren) &&
988 Tok.isNot(tok::annot_pragma_openmp_end) &&
989 (!MayHaveTail || Tok.isNot(tok::colon)))
990 Diag(Tok, diag::err_omp_expected_punc)
1002 const bool MustHaveTail = MayHaveTail && Tok.is(tok::colon);
1004 ColonLoc = Tok.getLocation();
1011 SkipUntil(tok::comma, tok::r_paren, tok::annot_pragma_openmp_end,
1025 Kind, Vars, TailExpr, Loc, LOpen, ColonLoc, Tok.getLocation(),