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

Erich Keane via cfe-commits cfe-commits at lists.llvm.org
Thu Dec 7 13:30:55 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")) {
----------------
erichkeane wrote:

  So I intended to do that for clauses themselves.
  
  These are construct-specific 'key-token' things, which i see value in something like that, at least as far as simplification.  I've chosen the name 'special token kind', as I don't think "StandardKind' really means what is being reflected here.

At the moment, we have 3 options for it (though only 2 for 'wait'), so once this patch goes in, I'll update the 'readonly' one from the last patch to use this infrastructure as well.

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


More information about the cfe-commits mailing list