Lines Matching refs:Tok
193 Token Tok = P.getCurToken(); in parseOpenMPDirectiveKind() local
195 Tok.isAnnotation() in parseOpenMPDirectiveKind()
197 : getOpenMPDirectiveKindEx(P.getPreprocessor().getSpelling(Tok)); in parseOpenMPDirectiveKind()
205 Tok = P.getPreprocessor().LookAhead(0); in parseOpenMPDirectiveKind()
207 Tok.isAnnotation() in parseOpenMPDirectiveKind()
209 : getOpenMPDirectiveKindEx(P.getPreprocessor().getSpelling(Tok)); in parseOpenMPDirectiveKind()
224 Token Tok = P.getCurToken(); in parseOpenMPReductionId() local
229 if (Tok.is(tok::kw_operator)) { in parseOpenMPReductionId()
231 Tok = P.getCurToken(); in parseOpenMPReductionId()
234 switch (Tok.getKind()) { in parseOpenMPReductionId()
264 P.Diag(Tok.getLocation(), diag::err_omp_expected_reduction_identifier); in parseOpenMPReductionId()
271 return OOK == OO_None ? DeclNames.getIdentifier(Tok.getIdentifierInfo()) in parseOpenMPReductionId()
297 if (Name.isEmpty() && Tok.is(tok::annot_pragma_openmp_end)) in ParseOpenMPDeclareReductionDirective()
303 if (!IsCorrect && Tok.is(tok::annot_pragma_openmp_end)) in ParseOpenMPDeclareReductionDirective()
308 if (Tok.is(tok::colon) || Tok.is(tok::annot_pragma_openmp_end)) { in ParseOpenMPDeclareReductionDirective()
309 Diag(Tok.getLocation(), diag::err_expected_type); in ParseOpenMPDeclareReductionDirective()
313 if (!IsCorrect && Tok.is(tok::annot_pragma_openmp_end)) in ParseOpenMPDeclareReductionDirective()
334 if (Tok.is(tok::colon) || Tok.is(tok::annot_pragma_openmp_end)) in ParseOpenMPDeclareReductionDirective()
340 if (Tok.is(tok::annot_pragma_openmp_end)) { in ParseOpenMPDeclareReductionDirective()
341 Diag(Tok.getLocation(), diag::err_expected_type); in ParseOpenMPDeclareReductionDirective()
345 } while (Tok.isNot(tok::annot_pragma_openmp_end)); in ParseOpenMPDeclareReductionDirective()
352 if (!IsCorrect && Tok.is(tok::annot_pragma_openmp_end)) in ParseOpenMPDeclareReductionDirective()
359 if (Tok.is(tok::annot_pragma_openmp_end)) { in ParseOpenMPDeclareReductionDirective()
360 Diag(Tok.getLocation(), diag::err_expected_expression); in ParseOpenMPDeclareReductionDirective()
381 if (CombinerResult.isInvalid() && Tok.isNot(tok::r_paren) && in ParseOpenMPDeclareReductionDirective()
382 Tok.isNot(tok::annot_pragma_openmp_end)) { in ParseOpenMPDeclareReductionDirective()
389 if (Tok.isNot(tok::annot_pragma_openmp_end)) { in ParseOpenMPDeclareReductionDirective()
391 if (Tok.is(tok::identifier) && in ParseOpenMPDeclareReductionDirective()
392 Tok.getIdentifierInfo()->isStr("initializer")) { in ParseOpenMPDeclareReductionDirective()
395 Diag(Tok.getLocation(), diag::err_expected) << "'initializer'"; in ParseOpenMPDeclareReductionDirective()
406 if (Tok.isNot(tok::annot_pragma_openmp_end)) { in ParseOpenMPDeclareReductionDirective()
415 if (Tok.is(tok::identifier) && in ParseOpenMPDeclareReductionDirective()
416 Tok.getIdentifierInfo()->isStr("omp_priv")) { in ParseOpenMPDeclareReductionDirective()
426 if (InitializerResult.isInvalid() && Tok.isNot(tok::r_paren) && in ParseOpenMPDeclareReductionDirective()
427 Tok.isNot(tok::annot_pragma_openmp_end)) { in ParseOpenMPDeclareReductionDirective()
455 if (Tok.is(tok::code_completion)) { in ParseOpenMPReductionInitializerForDecl()
462 PreferredType.enterVariableInit(Tok.getLocation(), OmpPrivParm); in ParseOpenMPReductionInitializerForDecl()
472 } else if (Tok.is(tok::l_paren)) { in ParseOpenMPReductionInitializerForDecl()
489 PreferredType.enterFunctionArgument(Tok.getLocation(), in ParseOpenMPReductionInitializerForDecl()
498 SourceLocation RLoc = Tok.getLocation(); in ParseOpenMPReductionInitializerForDecl()
510 } else if (getLangOpts().CPlusPlus11 && Tok.is(tok::l_brace)) { in ParseOpenMPReductionInitializerForDecl()
512 Diag(Tok, diag::warn_cxx98_compat_generalized_initializer_lists); in ParseOpenMPReductionInitializerForDecl()
550 if (Tok.isNot(tok::identifier) && Tok.isNot(tok::kw_default)) { in ParseOpenMPDeclareMapperDirective()
551 Diag(Tok.getLocation(), diag::err_omp_mapper_illegal_identifier); in ParseOpenMPDeclareMapperDirective()
554 MapperId = DeclNames.getIdentifier(Tok.getIdentifierInfo()); in ParseOpenMPDeclareMapperDirective()
565 if (!IsCorrect && Tok.is(tok::annot_pragma_openmp_end)) in ParseOpenMPDeclareMapperDirective()
592 SourceLocation Loc = Tok.getLocation(); in ParseOpenMPDeclareMapperDirective()
604 while (Tok.isNot(tok::annot_pragma_openmp_end)) { in ParseOpenMPDeclareMapperDirective()
605 OpenMPClauseKind CKind = Tok.isAnnotation() in ParseOpenMPDeclareMapperDirective()
607 : getOpenMPClauseKind(PP.getSpelling(Tok)); in ParseOpenMPDeclareMapperDirective()
616 if (Tok.is(tok::comma)) in ParseOpenMPDeclareMapperDirective()
621 Diag(Tok, diag::err_omp_expected_clause) in ParseOpenMPDeclareMapperDirective()
652 Diag(Tok.getLocation(), diag::err_omp_mapper_expected_declarator); in parseOpenMPDeclareMapperVarDecl()
719 const Token &Tok = P.getCurToken(); in parseDeclareSimdClauses() local
721 while (Tok.isNot(tok::annot_pragma_openmp_end)) { in parseDeclareSimdClauses()
722 if (Tok.isNot(tok::identifier)) in parseDeclareSimdClauses()
725 IdentifierInfo *II = Tok.getIdentifierInfo(); in parseDeclareSimdClauses()
730 P.Diag(Tok, diag::err_omp_declare_simd_inbranch_notinbranch) in parseDeclareSimdClauses()
736 BSRange = SourceRange(Tok.getLocation(), Tok.getEndLoc()); in parseDeclareSimdClauses()
740 P.Diag(Tok, diag::err_omp_more_one_clause) in parseDeclareSimdClauses()
786 if (Tok.is(tok::comma)) in parseDeclareSimdClauses()
796 PP.EnterToken(Tok, /*IsReinject*/ true); in ParseOMPDeclareSimdClauses()
840 static StringRef getNameFromIdOrString(Parser &P, Token &Tok, in getNameFromIdOrString() argument
842 if (Tok.is(tok::identifier) || Tok.is(tok::kw_for)) { in getNameFromIdOrString()
844 StringRef Name = P.getPreprocessor().getSpelling(Tok, Buffer); in getNameFromIdOrString()
849 if (tok::isStringLiteral(Tok.getKind())) in getNameFromIdOrString()
852 P.Diag(Tok.getLocation(), in getNameFromIdOrString()
882 SourceLocation NameLoc = Tok.getLocation(); in parseOMPTraitPropertyKind()
883 StringRef Name = getNameFromIdOrString(*this, Tok, CONTEXT_TRAIT_LVL); in parseOMPTraitPropertyKind()
885 Diag(Tok.getLocation(), diag::note_omp_declare_variant_ctx_options) in parseOMPTraitPropertyKind()
1002 SourceLocation PropertyLoc = Tok.getLocation(); in parseOMPContextProperty()
1007 if (!checkExtensionProperty(*this, Tok.getLocation(), TIProperty, in parseOMPContextProperty()
1013 if (PropertyLoc != Tok.getLocation()) in parseOMPContextProperty()
1014 Diag(Tok.getLocation(), diag::note_omp_declare_variant_ctx_continue_here) in parseOMPContextProperty()
1040 Diag(Tok.getLocation(), diag::note_omp_declare_variant_ctx_continue_here) in parseOMPContextProperty()
1049 SourceLocation NameLoc = Tok.getLocation(); in parseOMPTraitSelectorKind()
1050 StringRef Name = getNameFromIdOrString(*this, Tok, CONTEXT_SELECTOR_LVL); in parseOMPTraitSelectorKind()
1052 Diag(Tok.getLocation(), diag::note_omp_declare_variant_ctx_options) in parseOMPTraitSelectorKind()
1137 if (Tok.is(tok::r_paren) && OuterPC > ParenCount) in parseOMPContextSelector()
1143 if (!Tok.is(tok::comma) && !Tok.is(tok::r_paren)) { in parseOMPContextSelector()
1149 Diag(Tok.getLocation(), diag::note_omp_declare_variant_ctx_continue_here) in parseOMPContextSelector()
1153 SourceLocation SelectorLoc = Tok.getLocation(); in parseOMPContextSelector()
1180 if (!Tok.is(tok::l_paren)) { in parseOMPContextSelector()
1203 SourceLocation ScoreLoc = Tok.getLocation(); in parseOMPContextSelector()
1235 SourceLocation NameLoc = Tok.getLocation(); in parseOMPTraitSetKind()
1236 StringRef Name = getNameFromIdOrString(*this, Tok, CONTEXT_SELECTOR_SET_LVL); in parseOMPTraitSetKind()
1238 Diag(Tok.getLocation(), diag::note_omp_declare_variant_ctx_options) in parseOMPTraitSetKind()
1307 if (Tok.is(tok::r_brace) && OuterBC > BraceCount) in parseOMPContextSelectorSet()
1313 if (!Tok.is(tok::comma) && !Tok.is(tok::r_brace)) { in parseOMPContextSelectorSet()
1319 Diag(Tok.getLocation(), diag::note_omp_declare_variant_ctx_continue_here) in parseOMPContextSelectorSet()
1329 Diag(Tok.getLocation(), diag::warn_omp_declare_variant_expected) in parseOMPContextSelectorSet()
1336 if (Tok.is(tok::l_brace)) { in parseOMPContextSelectorSet()
1339 Diag(Tok.getLocation(), diag::warn_omp_declare_variant_expected) in parseOMPContextSelectorSet()
1356 if (Tok.is(tok::r_brace)) { in parseOMPContextSelectorSet()
1359 Diag(Tok.getLocation(), diag::warn_omp_declare_variant_expected) in parseOMPContextSelectorSet()
1386 PP.EnterToken(Tok, /*IsReinject*/ true); in ParseOMPDeclareVariantClauses()
1409 if (!Tok.is(tok::annot_pragma_openmp_end)) in ParseOMPDeclareVariantClauses()
1426 if (Tok.is(tok::annot_pragma_openmp_end)) { in ParseOMPDeclareVariantClauses()
1427 Diag(Tok.getLocation(), diag::err_omp_declare_variant_wrong_clause) in ParseOMPDeclareVariantClauses()
1432 while (Tok.isNot(tok::annot_pragma_openmp_end)) { in ParseOMPDeclareVariantClauses()
1433 OpenMPClauseKind CKind = Tok.isAnnotation() in ParseOMPDeclareVariantClauses()
1435 : getOpenMPClauseKind(PP.getSpelling(Tok)); in ParseOMPDeclareVariantClauses()
1438 Diag(Tok.getLocation(), diag::err_omp_declare_variant_wrong_clause) in ParseOMPDeclareVariantClauses()
1448 AdjustArgsLoc = Tok.getLocation(); in ParseOMPDeclareVariantClauses()
1469 AppendArgsLoc = Tok.getLocation(); in ParseOMPDeclareVariantClauses()
1486 if (Tok.is(tok::comma)) in ParseOMPDeclareVariantClauses()
1493 SourceRange(Loc, Tok.getLocation())); in ParseOMPDeclareVariantClauses()
1499 SourceRange(Loc, Tok.getLocation())); in ParseOMPDeclareVariantClauses()
1509 const Token &Tok = P.getCurToken(); in parseInteropTypeList() local
1514 while (Tok.is(tok::identifier)) { in parseInteropTypeList()
1515 if (Tok.getIdentifierInfo()->isStr("target")) { in parseInteropTypeList()
1520 P.Diag(Tok, diag::warn_omp_more_one_interop_type) << "target"; in parseInteropTypeList()
1522 } else if (Tok.getIdentifierInfo()->isStr("targetsync")) { in parseInteropTypeList()
1524 P.Diag(Tok, diag::warn_omp_more_one_interop_type) << "targetsync"; in parseInteropTypeList()
1528 P.Diag(Tok, diag::err_omp_expected_interop_type); in parseInteropTypeList()
1532 if (!Tok.is(tok::comma)) in parseInteropTypeList()
1540 P.Diag(Tok, diag::err_omp_expected_interop_type); in parseInteropTypeList()
1564 while (Tok.is(tok::identifier) && Tok.getIdentifierInfo()->isStr("interop")) { in parseOpenMPAppendArgs()
1579 if (Tok.is(tok::comma)) in parseOpenMPAppendArgs()
1584 Diag(Tok.getLocation(), diag::err_omp_unexpected_append_op); in parseOpenMPAppendArgs()
1596 OpenMPClauseKind CKind = Tok.isAnnotation() in parseOMPDeclareVariantMatchClause()
1598 : getOpenMPClauseKind(PP.getSpelling(Tok)); in parseOMPDeclareVariantMatchClause()
1600 Diag(Tok.getLocation(), diag::err_omp_declare_variant_wrong_clause) in parseOMPDeclareVariantMatchClause()
1722 while (Tok.isNot(tok::annot_pragma_openmp_end)) { in ParseOpenMPAssumesDirective()
1724 SourceLocation StartLoc = Tok.getLocation(); in ParseOpenMPAssumesDirective()
1726 if (Tok.isAnyIdentifier()) { in ParseOpenMPAssumesDirective()
1727 II = Tok.getIdentifierInfo(); in ParseOpenMPAssumesDirective()
1732 bool NextIsLPar = Tok.is(tok::l_paren); in ParseOpenMPAssumesDirective()
1753 Diag(Tok.getLocation(), in ParseOpenMPAssumesDirective()
1803 const Token &Tok = P.getCurToken(); in parseOpenMPSimpleClause() local
1804 SourceLocation Loc = Tok.getLocation(); in parseOpenMPSimpleClause()
1813 Kind, Tok.isAnnotation() ? "" : P.getPreprocessor().getSpelling(Tok), in parseOpenMPSimpleClause()
1815 SourceLocation TypeLoc = Tok.getLocation(); in parseOpenMPSimpleClause()
1816 if (Tok.isNot(tok::r_paren) && Tok.isNot(tok::comma) && in parseOpenMPSimpleClause()
1817 Tok.isNot(tok::annot_pragma_openmp_end)) in parseOpenMPSimpleClause()
1821 SourceLocation RLoc = Tok.getLocation(); in parseOpenMPSimpleClause()
1833 while (Tok.isNot(tok::annot_pragma_openmp_end)) { in ParseOMPDeclareTargetClauses()
1835 bool HasIdentifier = Tok.is(tok::identifier); in ParseOMPDeclareTargetClauses()
1839 IdentifierInfo *II = Tok.getIdentifierInfo(); in ParseOMPDeclareTargetClauses()
1848 Diag(Tok, diag::err_omp_more_one_clause) in ParseOMPDeclareTargetClauses()
1859 Diag(Tok, diag::err_omp_declare_target_unexpected_clause) in ParseOMPDeclareTargetClauses()
1864 Diag(Tok, diag::err_omp_declare_target_unexpected_clause) in ParseOMPDeclareTargetClauses()
1929 if (Tok.is(tok::l_paren)) { in ParseOMPDeclareTargetClauses()
1930 Diag(Tok, in ParseOMPDeclareTargetClauses()
1934 if (!HasIdentifier && Tok.isNot(tok::annot_pragma_openmp_end)) { in ParseOMPDeclareTargetClauses()
1935 Diag(Tok, in ParseOMPDeclareTargetClauses()
1941 if (Tok.is(tok::comma)) in ParseOMPDeclareTargetClauses()
1960 if (Tok.is(tok::annot_pragma_openmp_end)) in skipUntilPragmaOpenMPEnd()
1963 Diag(Tok, diag::warn_omp_extra_tokens_at_eol) in skipUntilPragmaOpenMPEnd()
1965 while (Tok.isNot(tok::annot_pragma_openmp_end)) in skipUntilPragmaOpenMPEnd()
1995 Tok.getLocation(), in ParseOMPEndDeclareTargetDirective()
1998 if (Tok.is(tok::annot_pragma_openmp_end)) in ParseOMPEndDeclareTargetDirective()
2041 assert(Tok.isOneOf(tok::annot_pragma_openmp, tok::annot_attr_openmp) && in ParseOpenMPDeclarativeDirectiveWithExtDecl()
2057 Toks.push_back(Tok); in ParseOpenMPDeclarativeDirectiveWithExtDecl()
2058 while (Cnt && Tok.isNot(tok::eof)) { in ParseOpenMPDeclarativeDirectiveWithExtDecl()
2060 if (Tok.isOneOf(tok::annot_pragma_openmp, tok::annot_attr_openmp)) in ParseOpenMPDeclarativeDirectiveWithExtDecl()
2062 else if (Tok.is(tok::annot_pragma_openmp_end)) in ParseOpenMPDeclarativeDirectiveWithExtDecl()
2064 Toks.push_back(Tok); in ParseOpenMPDeclarativeDirectiveWithExtDecl()
2100 if (Tok.isNot(tok::annot_pragma_openmp_end)) { in ParseOpenMPDeclarativeDirectiveWithExtDecl()
2104 while (Tok.isNot(tok::annot_pragma_openmp_end)) { in ParseOpenMPDeclarativeDirectiveWithExtDecl()
2106 Tok.isAnnotation() ? OMPC_unknown in ParseOpenMPDeclarativeDirectiveWithExtDecl()
2107 : getOpenMPClauseKind(PP.getSpelling(Tok)); in ParseOpenMPDeclarativeDirectiveWithExtDecl()
2116 if (Tok.is(tok::annot_pragma_openmp_end)) { in ParseOpenMPDeclarativeDirectiveWithExtDecl()
2121 if (Tok.is(tok::comma)) in ParseOpenMPDeclarativeDirectiveWithExtDecl()
2140 if (Tok.is(tok::annot_pragma_openmp_end)) { in ParseOpenMPDeclarativeDirectiveWithExtDecl()
2141 Diag(Tok, diag::err_omp_expected_clause) in ParseOpenMPDeclarativeDirectiveWithExtDecl()
2145 while (Tok.isNot(tok::annot_pragma_openmp_end)) { in ParseOpenMPDeclarativeDirectiveWithExtDecl()
2146 OpenMPClauseKind CKind = Tok.isAnnotation() in ParseOpenMPDeclarativeDirectiveWithExtDecl()
2148 : getOpenMPClauseKind(PP.getSpelling(Tok)); in ParseOpenMPDeclarativeDirectiveWithExtDecl()
2157 if (Tok.is(tok::annot_pragma_openmp_end)) { in ParseOpenMPDeclarativeDirectiveWithExtDecl()
2162 if (Tok.is(tok::comma)) in ParseOpenMPDeclarativeDirectiveWithExtDecl()
2168 Diag(Tok, diag::err_omp_expected_clause) in ParseOpenMPDeclarativeDirectiveWithExtDecl()
2248 DKLoc = Tok.getLocation(); in ParseOpenMPDeclarativeDirectiveWithExtDecl()
2280 Toks.push_back(Tok); in ParseOpenMPDeclarativeDirectiveWithExtDecl()
2282 while (Tok.isNot(tok::annot_pragma_openmp_end)) { in ParseOpenMPDeclarativeDirectiveWithExtDecl()
2283 Toks.push_back(Tok); in ParseOpenMPDeclarativeDirectiveWithExtDecl()
2286 Toks.push_back(Tok); in ParseOpenMPDeclarativeDirectiveWithExtDecl()
2290 if (Tok.isOneOf(tok::annot_pragma_openmp, tok::annot_attr_openmp)) { in ParseOpenMPDeclarativeDirectiveWithExtDecl()
2293 } else if (Tok.isNot(tok::r_brace) && !isEofOrEom()) { in ParseOpenMPDeclarativeDirectiveWithExtDecl()
2320 bool HasClauses = Tok.isNot(tok::annot_pragma_openmp_end); in ParseOpenMPDeclarativeDirectiveWithExtDecl()
2344 Diag(Tok, diag::err_omp_unexpected_directive) in ParseOpenMPDeclarativeDirectiveWithExtDecl()
2354 Diag(Tok, diag::err_omp_unknown_directive); in ParseOpenMPDeclarativeDirectiveWithExtDecl()
2425 Diag(Tok, diag::err_omp_unexpected_directive) in ParseOpenMPDeclarativeDirectiveWithExtDecl()
2431 while (Tok.isNot(tok::annot_pragma_openmp_end)) in ParseOpenMPDeclarativeDirectiveWithExtDecl()
2480 assert(Tok.isOneOf(tok::annot_pragma_openmp, tok::annot_attr_openmp) && in ParseOpenMPDeclarativeOrExecutableDirective()
2491 ? Tok.getLocation() in ParseOpenMPDeclarativeOrExecutableDirective()
2496 Diag(Tok, diag::err_omp_unknown_directive); in ParseOpenMPDeclarativeOrExecutableDirective()
2509 Diag(Tok, diag::err_omp_immediate_directive) in ParseOpenMPDeclarativeOrExecutableDirective()
2513 if (Tok.is(tok::annot_pragma_openmp_end)) in ParseOpenMPDeclarativeOrExecutableDirective()
2528 while (Tok.isNot(tok::annot_pragma_openmp_end)) { in ParseOpenMPDeclarativeOrExecutableDirective()
2529 OpenMPClauseKind CKind = Tok.isAnnotation() in ParseOpenMPDeclarativeOrExecutableDirective()
2531 : getOpenMPClauseKind(PP.getSpelling(Tok)); in ParseOpenMPDeclarativeOrExecutableDirective()
2544 Diag(Tok, diag::err_omp_expected_context_selector) << "when clause"; in ParseOpenMPDeclarativeOrExecutableDirective()
2550 if (Tok.is(tok::colon)) in ParseOpenMPDeclarativeOrExecutableDirective()
2553 Diag(Tok, diag::err_omp_expected_colon) << "when clause"; in ParseOpenMPDeclarativeOrExecutableDirective()
2560 while (Tok.isNot(tok::r_paren) || paren != 0) { in ParseOpenMPDeclarativeOrExecutableDirective()
2561 if (Tok.is(tok::l_paren)) in ParseOpenMPDeclarativeOrExecutableDirective()
2563 if (Tok.is(tok::r_paren)) in ParseOpenMPDeclarativeOrExecutableDirective()
2565 if (Tok.is(tok::annot_pragma_openmp_end)) { in ParseOpenMPDeclarativeOrExecutableDirective()
2566 Diag(Tok, diag::err_omp_expected_punc) in ParseOpenMPDeclarativeOrExecutableDirective()
2574 if (Tok.is(tok::r_paren)) in ParseOpenMPDeclarativeOrExecutableDirective()
2604 while (Tok.isNot(tok::annot_pragma_openmp_end)) { in ParseOpenMPDeclarativeOrExecutableDirective()
2611 while (Tok.isNot(tok::r_paren) || paren != 0) { in ParseOpenMPDeclarativeOrExecutableDirective()
2612 if (Tok.is(tok::l_paren)) in ParseOpenMPDeclarativeOrExecutableDirective()
2614 if (Tok.is(tok::r_paren)) in ParseOpenMPDeclarativeOrExecutableDirective()
2619 if (Tok.is(tok::r_paren)) in ParseOpenMPDeclarativeOrExecutableDirective()
2624 OpenMPClauseKind CKind = Tok.isAnnotation() in ParseOpenMPDeclarativeOrExecutableDirective()
2626 : getOpenMPClauseKind(PP.getSpelling(Tok)); in ParseOpenMPDeclarativeOrExecutableDirective()
2644 if (Tok.is(tok::r_paren)) { in ParseOpenMPDeclarativeOrExecutableDirective()
2661 Diag(Tok, diag::err_omp_immediate_directive) in ParseOpenMPDeclarativeOrExecutableDirective()
2671 Directive = Actions.ActOnDeclStmt(Res, Loc, Tok.getLocation()); in ParseOpenMPDeclarativeOrExecutableDirective()
2680 Diag(Tok, diag::err_omp_immediate_directive) in ParseOpenMPDeclarativeOrExecutableDirective()
2688 if (Tok.isNot(tok::annot_pragma_openmp_end)) { in ParseOpenMPDeclarativeOrExecutableDirective()
2692 while (Tok.isNot(tok::annot_pragma_openmp_end)) { in ParseOpenMPDeclarativeOrExecutableDirective()
2694 Tok.isAnnotation() ? OMPC_unknown in ParseOpenMPDeclarativeOrExecutableDirective()
2695 : getOpenMPClauseKind(PP.getSpelling(Tok)); in ParseOpenMPDeclarativeOrExecutableDirective()
2704 if (Tok.is(tok::annot_pragma_openmp_end)) { in ParseOpenMPDeclarativeOrExecutableDirective()
2709 if (Tok.is(tok::comma)) in ParseOpenMPDeclarativeOrExecutableDirective()
2717 Directive = Actions.ActOnDeclStmt(Res, Loc, Tok.getLocation()); in ParseOpenMPDeclarativeOrExecutableDirective()
2728 Directive = Actions.ActOnDeclStmt(Res, Loc, Tok.getLocation()); in ParseOpenMPDeclarativeOrExecutableDirective()
2739 Directive = Actions.ActOnDeclStmt(Res, Loc, Tok.getLocation()); in ParseOpenMPDeclarativeOrExecutableDirective()
2759 Diag(Tok, diag::err_omp_immediate_directive) in ParseOpenMPDeclarativeOrExecutableDirective()
2826 ImplicitTok = Tok; in ParseOpenMPDeclarativeOrExecutableDirective()
2835 if (Tok.isAnyIdentifier()) { in ParseOpenMPDeclarativeOrExecutableDirective()
2837 DeclarationNameInfo(Tok.getIdentifierInfo(), Tok.getLocation()); in ParseOpenMPDeclarativeOrExecutableDirective()
2840 Diag(Tok, diag::err_omp_expected_identifier_for_critical); in ParseOpenMPDeclarativeOrExecutableDirective()
2846 if (Tok.isNot(tok::annot_pragma_openmp_end)) in ParseOpenMPDeclarativeOrExecutableDirective()
2857 while (Tok.isNot(tok::annot_pragma_openmp_end)) { in ParseOpenMPDeclarativeOrExecutableDirective()
2860 if (ReadDirectiveWithinMetadirective && Tok.is(tok::r_paren)) { in ParseOpenMPDeclarativeOrExecutableDirective()
2861 while (Tok.isNot(tok::annot_pragma_openmp_end)) in ParseOpenMPDeclarativeOrExecutableDirective()
2866 if (ImplicitClauseAllowed && Tok.is(tok::l_paren)) { in ParseOpenMPDeclarativeOrExecutableDirective()
2870 PP.EnterToken(Tok, /*IsReinject*/ true); in ParseOpenMPDeclarativeOrExecutableDirective()
2874 OpenMPClauseKind CKind = Tok.isAnnotation() in ParseOpenMPDeclarativeOrExecutableDirective()
2876 : getOpenMPClauseKind(PP.getSpelling(Tok)); in ParseOpenMPDeclarativeOrExecutableDirective()
2900 if (Tok.is(tok::comma)) in ParseOpenMPDeclarativeOrExecutableDirective()
2905 EndLoc = Tok.getLocation(); in ParseOpenMPDeclarativeOrExecutableDirective()
2969 Diag(Tok, diag::err_omp_unexpected_directive) in ParseOpenMPDeclarativeOrExecutableDirective()
2975 Diag(Tok, diag::err_omp_unknown_directive); in ParseOpenMPDeclarativeOrExecutableDirective()
3000 while (Tok.isNot(tok::r_paren) && Tok.isNot(tok::annot_pragma_openmp_end)) { in ParseOpenMPSimpleVarList()
3004 Token PrevTok = Tok; in ParseOpenMPSimpleVarList()
3019 } else if (Tok.isNot(tok::comma) && Tok.isNot(tok::r_paren) && in ParseOpenMPSimpleVarList()
3020 Tok.isNot(tok::annot_pragma_openmp_end)) { in ParseOpenMPSimpleVarList()
3031 if (Tok.is(tok::comma)) { in ParseOpenMPSimpleVarList()
3037 Diag(Tok, diag::err_expected) << tok::identifier; in ParseOpenMPSimpleVarList()
3053 Diag(Tok, diag::err_expected) << tok::l_paren; in ParseOpenMPSizesClause()
3066 if (Tok.is(tok::r_paren) || Tok.is(tok::annot_pragma_openmp_end)) in ParseOpenMPSizesClause()
3079 SourceLocation Loc = Tok.getLocation(); in ParseOpenMPUsesAllocatorClause()
3097 if (Tok.is(tok::l_paren)) { in ParseOpenMPUsesAllocatorClause()
3113 if (Tok.isNot(tok::comma) && Tok.isNot(tok::r_paren)) in ParseOpenMPUsesAllocatorClause()
3114 Diag(Tok, diag::err_omp_expected_punc) << "uses_allocators" << 0; in ParseOpenMPUsesAllocatorClause()
3116 if (Tok.is(tok::comma)) in ParseOpenMPUsesAllocatorClause()
3118 } while (Tok.isNot(tok::r_paren) && Tok.isNot(tok::annot_pragma_openmp_end)); in ParseOpenMPUsesAllocatorClause()
3153 Diag(Tok, diag::err_omp_unexpected_clause) in ParseOpenMPClause()
3206 Diag(Tok, diag::err_omp_more_one_clause) in ParseOpenMPClause()
3233 Diag(Tok, diag::err_omp_more_one_clause) in ParseOpenMPClause()
3252 Diag(Tok, diag::err_omp_more_one_clause) in ParseOpenMPClause()
3287 Diag(Tok, diag::err_omp_more_one_clause) in ParseOpenMPClause()
3296 Diag(Tok, diag::err_omp_more_one_clause) in ParseOpenMPClause()
3334 Diag(Tok, diag::err_omp_more_one_clause) in ParseOpenMPClause()
3347 Diag(Tok, diag::err_omp_more_one_clause) in ParseOpenMPClause()
3367 Diag(Tok, diag::err_omp_unexpected_clause) in ParseOpenMPClause()
3387 SourceLocation ELoc = Tok.getLocation(); in ParseOpenMPParensExpr()
3394 RLoc = Tok.getLocation(); in ParseOpenMPParensExpr()
3445 SourceLocation LLoc = Tok.getLocation(); in ParseOpenMPSingleExprClause()
3467 if (Tok.isNot(tok::l_paren)) { in ParseOpenMPIndirectClause()
3538 if (Tok.is(tok::identifier) && PP.getSpelling(Tok) == "prefer_type") { in ParseOpenMPInteropClause()
3545 while (Tok.isNot(tok::r_paren)) { in ParseOpenMPInteropClause()
3546 SourceLocation Loc = Tok.getLocation(); in ParseOpenMPInteropClause()
3558 if (Tok.is(tok::comma)) in ParseOpenMPInteropClause()
3565 if (Tok.is(tok::comma)) in ParseOpenMPInteropClause()
3568 Diag(Tok, diag::err_omp_expected_punc_after_interop_mod); in ParseOpenMPInteropClause()
3576 if (Tok.isNot(tok::colon)) in ParseOpenMPInteropClause()
3577 Diag(Tok, diag::warn_pragma_expected_colon) << "interop types"; in ParseOpenMPInteropClause()
3579 if (Tok.is(tok::colon)) in ParseOpenMPInteropClause()
3584 SourceLocation VarLoc = Tok.getLocation(); in ParseOpenMPInteropClause()
3593 SourceLocation RLoc = Tok.getLocation(); in ParseOpenMPInteropClause()
3680 SourceLocation Loc = Tok.getLocation(); in ParseOpenMPClause()
3685 return Actions.ActOnOpenMPClause(Kind, Loc, Tok.getLocation()); in ParseOpenMPClause()
3726 Kind, Tok.isAnnotation() ? "" : PP.getSpelling(Tok), getLangOpts()); in ParseOpenMPSingleExprWithArgClause()
3730 KLoc[Modifier1] = Tok.getLocation(); in ParseOpenMPSingleExprWithArgClause()
3731 if (Tok.isNot(tok::r_paren) && Tok.isNot(tok::comma) && in ParseOpenMPSingleExprWithArgClause()
3732 Tok.isNot(tok::annot_pragma_openmp_end)) in ParseOpenMPSingleExprWithArgClause()
3734 if (Tok.is(tok::comma)) { in ParseOpenMPSingleExprWithArgClause()
3738 Kind, Tok.isAnnotation() ? "" : PP.getSpelling(Tok), getLangOpts()); in ParseOpenMPSingleExprWithArgClause()
3742 KLoc[Modifier2] = Tok.getLocation(); in ParseOpenMPSingleExprWithArgClause()
3743 if (Tok.isNot(tok::r_paren) && Tok.isNot(tok::comma) && in ParseOpenMPSingleExprWithArgClause()
3744 Tok.isNot(tok::annot_pragma_openmp_end)) in ParseOpenMPSingleExprWithArgClause()
3748 if (Tok.is(tok::colon)) in ParseOpenMPSingleExprWithArgClause()
3751 Diag(Tok, diag::warn_pragma_expected_colon) << "schedule modifier"; in ParseOpenMPSingleExprWithArgClause()
3753 Kind, Tok.isAnnotation() ? "" : PP.getSpelling(Tok), getLangOpts()); in ParseOpenMPSingleExprWithArgClause()
3756 KLoc[ScheduleKind] = Tok.getLocation(); in ParseOpenMPSingleExprWithArgClause()
3757 if (Tok.isNot(tok::r_paren) && Tok.isNot(tok::comma) && in ParseOpenMPSingleExprWithArgClause()
3758 Tok.isNot(tok::annot_pragma_openmp_end)) in ParseOpenMPSingleExprWithArgClause()
3763 Tok.is(tok::comma)) in ParseOpenMPSingleExprWithArgClause()
3767 Kind, Tok.isAnnotation() ? "" : PP.getSpelling(Tok), getLangOpts())); in ParseOpenMPSingleExprWithArgClause()
3768 KLoc.push_back(Tok.getLocation()); in ParseOpenMPSingleExprWithArgClause()
3769 if (Tok.isNot(tok::r_paren) && Tok.isNot(tok::comma) && in ParseOpenMPSingleExprWithArgClause()
3770 Tok.isNot(tok::annot_pragma_openmp_end)) in ParseOpenMPSingleExprWithArgClause()
3772 if (Arg.back() == OMPC_DIST_SCHEDULE_static && Tok.is(tok::comma)) in ParseOpenMPSingleExprWithArgClause()
3777 Kind, Tok.isAnnotation() ? "" : PP.getSpelling(Tok), getLangOpts()); in ParseOpenMPSingleExprWithArgClause()
3783 KLoc.push_back(Tok.getLocation()); in ParseOpenMPSingleExprWithArgClause()
3784 if (Tok.isNot(tok::r_paren) && Tok.isNot(tok::comma) && in ParseOpenMPSingleExprWithArgClause()
3785 Tok.isNot(tok::annot_pragma_openmp_end)) in ParseOpenMPSingleExprWithArgClause()
3788 if (Tok.is(tok::colon) || getLangOpts().OpenMP < 50) { in ParseOpenMPSingleExprWithArgClause()
3789 if (Tok.is(tok::colon)) in ParseOpenMPSingleExprWithArgClause()
3792 Diag(Tok, diag::warn_pragma_expected_colon) << "defaultmap modifier"; in ParseOpenMPSingleExprWithArgClause()
3795 Kind, Tok.isAnnotation() ? "" : PP.getSpelling(Tok), getLangOpts())); in ParseOpenMPSingleExprWithArgClause()
3796 KLoc.push_back(Tok.getLocation()); in ParseOpenMPSingleExprWithArgClause()
3797 if (Tok.isNot(tok::r_paren) && Tok.isNot(tok::comma) && in ParseOpenMPSingleExprWithArgClause()
3798 Tok.isNot(tok::annot_pragma_openmp_end)) in ParseOpenMPSingleExprWithArgClause()
3810 Kind, Tok.isAnnotation() ? "" : PP.getSpelling(Tok), getLangOpts())); in ParseOpenMPSingleExprWithArgClause()
3811 KLoc.push_back(Tok.getLocation()); in ParseOpenMPSingleExprWithArgClause()
3821 KLoc.push_back(Tok.getLocation()); in ParseOpenMPSingleExprWithArgClause()
3827 if (Tok.is(tok::colon) && getLangOpts().OpenMP > 40) { in ParseOpenMPSingleExprWithArgClause()
3843 SourceLocation ELoc = Tok.getLocation(); in ParseOpenMPSingleExprWithArgClause()
3851 SourceLocation RLoc = Tok.getLocation(); in ParseOpenMPSingleExprWithArgClause()
3914 Token Tok = P.getCurToken(); in isMapModifier() local
3915 if (!Tok.is(tok::identifier)) in isMapModifier()
3921 OMPC_map, PP.getSpelling(Tok), P.getLangOpts())); in isMapModifier()
3940 if (Tok.isNot(tok::identifier) && Tok.isNot(tok::kw_default)) { in parseMapperModifier()
3941 Diag(Tok.getLocation(), diag::err_omp_mapper_illegal_identifier); in parseMapperModifier()
3948 DeclNames.getIdentifier(Tok.getIdentifierInfo()), Tok.getLocation()); in parseMapperModifier()
3966 Data.MapTypeModifiersLoc.push_back(Tok.getLocation()); in parseMapTypeModifiers()
3970 Data.MapTypeModifiersLoc.push_back(Tok.getLocation()); in parseMapTypeModifiers()
3978 if (Tok.is(tok::comma)) { in parseMapTypeModifiers()
3979 Diag(Tok, diag::err_omp_map_type_modifier_missing); in parseMapTypeModifiers()
3986 Diag(Tok, diag::err_omp_unknown_map_type_modifier) in parseMapTypeModifiers()
4000 Token Tok = P.getCurToken(); in isMapType() local
4002 if (!Tok.isOneOf(tok::identifier, tok::kw_delete)) in isMapType()
4007 OMPC_map, PP.getSpelling(Tok), P.getLangOpts())); in isMapType()
4015 Token Tok = P.getCurToken(); in parseMapType() local
4016 if (Tok.is(tok::colon)) { in parseMapType()
4017 P.Diag(Tok, diag::err_omp_map_type_missing); in parseMapType()
4022 P.Diag(Tok, diag::err_omp_unknown_map_type); in parseMapType()
4029 assert(Tok.is(tok::identifier) && PP.getSpelling(Tok) == "iterator" && in ParseOpenMPIteratorsExpr()
4039 while (Tok.isNot(tok::r_paren) && Tok.isNot(tok::annot_pragma_openmp_end)) { in ParseOpenMPIteratorsExpr()
4042 if (Tok.isNot(tok::identifier) || NextToken().isNot(tok::equal)) { in ParseOpenMPIteratorsExpr()
4055 if (Tok.is(tok::identifier)) { in ParseOpenMPIteratorsExpr()
4056 II = Tok.getIdentifierInfo(); in ParseOpenMPIteratorsExpr()
4059 Diag(Tok, diag::err_expected_unqualified_id) << 0; in ParseOpenMPIteratorsExpr()
4064 if (Tok.is(tok::equal)) in ParseOpenMPIteratorsExpr()
4067 Diag(Tok, diag::err_omp_expected_equal_in_iterator); in ParseOpenMPIteratorsExpr()
4072 SourceLocation Loc = Tok.getLocation(); in ParseOpenMPIteratorsExpr()
4080 if (Tok.is(tok::colon)) in ParseOpenMPIteratorsExpr()
4084 Loc = Tok.getLocation(); in ParseOpenMPIteratorsExpr()
4094 if (Tok.is(tok::colon)) { in ParseOpenMPIteratorsExpr()
4098 Loc = Tok.getLocation(); in ParseOpenMPIteratorsExpr()
4107 if (Tok.isNot(tok::comma) && Tok.isNot(tok::r_paren)) in ParseOpenMPIteratorsExpr()
4108 Diag(Tok, diag::err_omp_expected_punc_after_iterator); in ParseOpenMPIteratorsExpr()
4109 if (Tok.is(tok::comma)) in ParseOpenMPIteratorsExpr()
4125 SourceLocation RLoc = Tok.getLocation(); in ParseOpenMPIteratorsExpr()
4141 if (Tok.is(tok::identifier) && in ParseOpenMPReservedLocator()
4142 Tok.getIdentifierInfo()->isStr("omp_all_memory")) { in ParseOpenMPReservedLocator()
4146 Diag(Tok, diag::warn_omp_more_one_omp_all_memory); in ParseOpenMPReservedLocator()
4149 Diag(Tok, diag::err_omp_requires_out_inout_depend_type); in ParseOpenMPReservedLocator()
4184 (Tok.is(tok::identifier) || Tok.is(tok::kw_default)) && in ParseOpenMPVarList()
4188 getOpenMPSimpleClauseType(Kind, PP.getSpelling(Tok), getLangOpts()); in ParseOpenMPVarList()
4189 Data.ExtraModifierLoc = Tok.getLocation(); in ParseOpenMPVarList()
4191 assert(Tok.is(tok::comma) && "Expected comma."); in ParseOpenMPVarList()
4206 if (Tok.is(tok::colon)) in ParseOpenMPVarList()
4209 Diag(Tok, diag::warn_pragma_expected_colon) << "reduction identifier"; in ParseOpenMPVarList()
4215 if (Tok.is(tok::identifier) && PP.getSpelling(Tok) == "iterator") { in ParseOpenMPVarList()
4233 Kind, Tok.is(tok::identifier) ? PP.getSpelling(Tok) : "", in ParseOpenMPVarList()
4235 Data.ExtraModifierLoc = Tok.getLocation(); in ParseOpenMPVarList()
4248 if (Tok.is(tok::colon)) { in ParseOpenMPVarList()
4251 Diag(Tok, DKind == OMPD_ordered ? diag::warn_pragma_expected_colon_r_paren in ParseOpenMPVarList()
4258 if (Tok.is(tok::identifier) && PP.LookAhead(0).is(tok::l_paren)) { in ParseOpenMPVarList()
4260 getOpenMPSimpleClauseType(Kind, PP.getSpelling(Tok), getLangOpts()); in ParseOpenMPVarList()
4272 Tok.is(tok::identifier) && PP.LookAhead(0).is(tok::colon)) { in ParseOpenMPVarList()
4274 getOpenMPSimpleClauseType(Kind, PP.getSpelling(Tok), getLangOpts()); in ParseOpenMPVarList()
4275 Data.ExtraModifierLoc = Tok.getLocation(); in ParseOpenMPVarList()
4277 assert(Tok.is(tok::colon) && "Expected colon."); in ParseOpenMPVarList()
4288 Data.ExtraModifierLoc = Tok.getLocation(); in ParseOpenMPVarList()
4295 if (Tok.is(tok::colon)) in ParseOpenMPVarList()
4313 if (Tok.is(tok::colon)) in ParseOpenMPVarList()
4316 while (Tok.is(tok::identifier)) { in ParseOpenMPVarList()
4318 getOpenMPSimpleClauseType(Kind, PP.getSpelling(Tok), getLangOpts())); in ParseOpenMPVarList()
4322 Data.MotionModifiersLoc.push_back(Tok.getLocation()); in ParseOpenMPVarList()
4334 if (Tok.is(tok::comma)) in ParseOpenMPVarList()
4337 if (!Data.MotionModifiers.empty() && Tok.isNot(tok::colon)) { in ParseOpenMPVarList()
4340 Diag(Tok, diag::warn_pragma_expected_colon) << ")"; in ParseOpenMPVarList()
4342 Diag(Tok, diag::warn_pragma_expected_colon) << "motion modifier"; in ParseOpenMPVarList()
4350 Tok.is(tok::colon)) in ParseOpenMPVarList()
4353 (Kind == OMPC_affinity && Tok.is(tok::identifier) && in ParseOpenMPVarList()
4354 PP.getSpelling(Tok) == "iterator")) { in ParseOpenMPVarList()
4373 if (Tok.is(tok::colon)) { in ParseOpenMPVarList()
4392 Kind, Tok.is(tok::identifier) ? PP.getSpelling(Tok) : "", in ParseOpenMPVarList()
4394 Data.ExtraModifierLoc = Tok.getLocation(); in ParseOpenMPVarList()
4400 if (Tok.is(tok::colon)) in ParseOpenMPVarList()
4401 Data.ColonLoc = Tok.getLocation(); in ParseOpenMPVarList()
4416 while (IsComma || (Tok.isNot(tok::r_paren) && Tok.isNot(tok::colon) && in ParseOpenMPVarList()
4417 Tok.isNot(tok::annot_pragma_openmp_end))) { in ParseOpenMPVarList()
4432 IsComma = Tok.is(tok::comma); in ParseOpenMPVarList()
4435 else if (Tok.isNot(tok::r_paren) && in ParseOpenMPVarList()
4436 Tok.isNot(tok::annot_pragma_openmp_end) && in ParseOpenMPVarList()
4437 (!MayHaveTail || Tok.isNot(tok::colon))) in ParseOpenMPVarList()
4438 Diag(Tok, diag::err_omp_expected_punc) in ParseOpenMPVarList()
4449 const bool MustHaveTail = MayHaveTail && Tok.is(tok::colon); in ParseOpenMPVarList()
4451 Data.ColonLoc = Tok.getLocation(); in ParseOpenMPVarList()
4464 Data.RLoc = Tok.getLocation(); in ParseOpenMPVarList()
4535 SourceLocation Loc = Tok.getLocation(); in ParseOpenMPVarListClause()