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

via cfe-commits cfe-commits at lists.llvm.org
Tue Dec 5 07:58:07 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)) {
----------------
cor3ntin wrote:

Note that if you wanted to have a ParseCIdentifierExpression or something like that, I think it would be an improvement

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


More information about the cfe-commits mailing list