[clang] [OpenACC] Implement 'cache' construct parsing (PR #74324)

Erich Keane via cfe-commits cfe-commits at lists.llvm.org
Tue Dec 5 08:08:50 PST 2023


================
@@ -237,19 +240,18 @@ void ParseOpenACCClauseList(Parser &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 Parser::ParseOpenACCIDExpression() {
   ExprResult Res;
   if (getLangOpts().CPlusPlus) {
     Res = ParseCXXIdExpression(/*isAddressOfOperand=*/false);
   } else {
     // There isn't anything quite the same as ParseCXXIdExpression for C, so we
     // need to get the identifier, then call into Sema ourselves.
 
-    if (expectIdentifier())
+    if (Tok.isNot(tok::identifier)) {
----------------
erichkeane wrote:

I've yet to find anywhere that really needs something like that other than OpenACC, so I didn't see value in pulling it out.  In fact, even the CXX version is rarely used.  

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


More information about the cfe-commits mailing list