[clang] [OpenACC] Implement 'routine' construct parsing (PR #73143)

Alexey Bataev via cfe-commits cfe-commits at lists.llvm.org
Wed Nov 22 09:09:55 PST 2023


================
@@ -232,32 +235,87 @@ void ParseOpenACCClauseList(Parser &P) {
     P.Diag(P.getCurToken(), diag::warn_pragma_acc_unimplemented_clause_parsing);
 }
 
-void ParseOpenACCDirective(Parser &P) {
-  OpenACCDirectiveKind DirKind = ParseOpenACCDirectiveKind(P);
+} // namespace
+
+// Routine has an optional paren-wrapped name of a function in the local scope.
+// We parse the name, emitting any diagnostics
+ExprResult Parser::ParseOpenACCRoutineName() {
+
+  ExprResult Res;
+  if (getLangOpts().CPlusPlus)
+    Res = ParseCXXIdExpression(/*isAddressOfOperand=*/false);
+  else {
----------------
alexey-bataev wrote:

Enclose in braces for uniformity

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


More information about the cfe-commits mailing list