[clang] [OpenACC] Implement 'wait' construct parsing (PR #74752)

Alexey Bataev via cfe-commits cfe-commits at lists.llvm.org
Thu Dec 7 12:57:11 PST 2023


================
@@ -251,6 +254,67 @@ void ParseOpenACCClauseList(Parser &P) {
 
 } // namespace
 
+/// OpenACC 3.3, section 2.16:
+/// In this section and throughout the specification, the term wait-argument
+/// means:
+/// [ devnum : int-expr : ] [ queues : ] async-argument-list
+bool Parser::ParseOpenACCWaitArgument() {
+  // [devnum : int-expr : ]
+  if (Tok.is(tok::identifier) && NextToken().is(tok::colon) &&
+      Tok.getIdentifierInfo()->isStr("devnum")) {
----------------
alexey-bataev wrote:

I think better to introduce function, similar to isOpenACCDirectiveKind, something like isOpenACCStandardKind or something similar to check for some clauses-like tokens.

https://github.com/llvm/llvm-project/pull/74752


More information about the cfe-commits mailing list