================ @@ -298,7 +367,18 @@ void Parser::ParseOpenACCDirective() { T.consumeClose(); break; } + case OpenACCDirectiveKind::Cache: + ParseOpenACCCacheVarList(); + // The ParseOpenACCCacheVarList function manages to recover from failures, + // so we can always consume the close. + T.consumeClose(); + break; } + } else if (DirKind == OpenACCDirectiveKind::Cache) { + // Cache's paren var-list is required, so error here if it isn't provided. + // We know that the consumeOpen above left the first non-paren here, so use + // expectAndConsume to emit the proper dialog, then continue. + (void)T.expectAndConsume(); ---------------- alexey-bataev wrote:
Why do not call for ParseOpenACCCacheVarList(); here? https://github.com/llvm/llvm-project/pull/74324 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits