@@ -2760,17 +2760,15 @@ StmtResult Parser::ParseOpenMPDeclarativeOrExecutableDirective(
27602760 ? OMPC_unknown
27612761 : getOpenMPClauseKind (PP.getSpelling (Tok));
27622762 // Check if the clause is unrecognized.
2763- if (CKind == OMPC_unknown) {
2763+ if (CKind == OMPC_unknown)
27642764 Diag (Tok, diag::err_omp_unknown_clause)
27652765 << PP.getSpelling (Tok) << " metadirective" ;
2766- }
2767- if (getLangOpts ().OpenMP < 52 && CKind == OMPC_otherwise) {
2766+ if (getLangOpts ().OpenMP < 52 && CKind == OMPC_otherwise)
27682767 Diag (Tok, diag::err_omp_unexpected_clause)
27692768 << PP.getSpelling (Tok) << " metadirective" ;
2770- }
2771- if (CKind == OMPC_default && getLangOpts ().OpenMP >= 52 ) {
2769+ if (CKind == OMPC_default && getLangOpts ().OpenMP >= 52 )
27722770 Diag (Tok, diag::warn_omp_default_deprecated);
2773- }
2771+
27742772 SourceLocation Loc = ConsumeToken ();
27752773
27762774 // Parse '('.
@@ -2797,13 +2795,7 @@ StmtResult Parser::ParseOpenMPDeclarativeOrExecutableDirective(
27972795 return Directive;
27982796 }
27992797 }
2800- if (CKind == OMPC_otherwise) {
2801- // Check for 'otherwise' keyword.
2802- if (Tok.is (tok::identifier) &&
2803- Tok.getIdentifierInfo ()->getName () == " otherwise" ) {
2804- ConsumeToken (); // Consume 'otherwise'
2805- }
2806- }
2798+
28072799 // Skip Directive for now. We will parse directive in the second iteration
28082800 int paren = 0 ;
28092801 while (Tok.isNot (tok::r_paren) || paren != 0 ) {
0 commit comments