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

2023-12-06 Thread Erich Keane via cfe-commits
https://github.com/erichkeane closed https://github.com/llvm/llvm-project/pull/74324 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2023-12-05 Thread via cfe-commits
https://github.com/cor3ntin approved this pull request. Thanks! https://github.com/llvm/llvm-project/pull/74324 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2023-12-05 Thread Erich Keane via cfe-commits
https://github.com/erichkeane updated https://github.com/llvm/llvm-project/pull/74324 >From 31fe05335fce5f7c593e4c3f3595c548cf54bba0 Mon Sep 17 00:00:00 2001 From: erichkeane Date: Wed, 29 Nov 2023 11:12:02 -0800 Subject: [PATCH 1/6] [OpenACC] Implement 'cache' construct parsing The 'cache' co

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

2023-12-05 Thread Erich Keane via cfe-commits
https://github.com/erichkeane updated https://github.com/llvm/llvm-project/pull/74324 >From 31fe05335fce5f7c593e4c3f3595c548cf54bba0 Mon Sep 17 00:00:00 2001 From: erichkeane Date: Wed, 29 Nov 2023 11:12:02 -0800 Subject: [PATCH 1/5] [OpenACC] Implement 'cache' construct parsing The 'cache' co

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

2023-12-05 Thread Erich Keane via cfe-commits
@@ -268,6 +270,71 @@ ExprResult Parser::ParseOpenACCRoutineName() { return getActions().CorrectDelayedTyposInExpr(Res); } +void Parser::ParseOpenACCCacheVar() { + ExprResult ArrayName = ParseOpenACCIDExpression(); + // FIXME: Pass this to Sema. + (void)ArrayName; + + //

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

2023-12-05 Thread via cfe-commits
@@ -268,6 +270,71 @@ ExprResult Parser::ParseOpenACCRoutineName() { return getActions().CorrectDelayedTyposInExpr(Res); } +void Parser::ParseOpenACCCacheVar() { + ExprResult ArrayName = ParseOpenACCIDExpression(); + // FIXME: Pass this to Sema. + (void)ArrayName; + + //

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

2023-12-05 Thread Erich Keane via cfe-commits
https://github.com/erichkeane updated https://github.com/llvm/llvm-project/pull/74324 >From 31fe05335fce5f7c593e4c3f3595c548cf54bba0 Mon Sep 17 00:00:00 2001 From: erichkeane Date: Wed, 29 Nov 2023 11:12:02 -0800 Subject: [PATCH 1/4] [OpenACC] Implement 'cache' construct parsing The 'cache' co

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

2023-12-05 Thread Erich Keane via cfe-commits
https://github.com/erichkeane updated https://github.com/llvm/llvm-project/pull/74324 >From 31fe05335fce5f7c593e4c3f3595c548cf54bba0 Mon Sep 17 00:00:00 2001 From: erichkeane Date: Wed, 29 Nov 2023 11:12:02 -0800 Subject: [PATCH 1/3] [OpenACC] Implement 'cache' construct parsing The 'cache' co

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

2023-12-05 Thread Erich Keane via cfe-commits
@@ -268,6 +270,71 @@ ExprResult Parser::ParseOpenACCRoutineName() { return getActions().CorrectDelayedTyposInExpr(Res); } +void Parser::ParseOpenACCCacheVar() { + ExprResult ArrayName = ParseOpenACCIDExpression(); + // FIXME: Pass this to Sema. + (void)ArrayName; + + //

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

2023-12-05 Thread Erich Keane via cfe-commits
@@ -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:

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

2023-12-05 Thread Erich Keane via cfe-commits
@@ -268,6 +270,71 @@ ExprResult Parser::ParseOpenACCRoutineName() { return getActions().CorrectDelayedTyposInExpr(Res); } +void Parser::ParseOpenACCCacheVar() { + ExprResult ArrayName = ParseOpenACCIDExpression(); + // FIXME: Pass this to Sema. + (void)ArrayName; + + //

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

2023-12-05 Thread via cfe-commits
@@ -268,6 +270,71 @@ ExprResult Parser::ParseOpenACCRoutineName() { return getActions().CorrectDelayedTyposInExpr(Res); } +void Parser::ParseOpenACCCacheVar() { + ExprResult ArrayName = ParseOpenACCIDExpression(); + // FIXME: Pass this to Sema. + (void)ArrayName; + + //

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

2023-12-05 Thread via cfe-commits
@@ -268,6 +270,71 @@ ExprResult Parser::ParseOpenACCRoutineName() { return getActions().CorrectDelayedTyposInExpr(Res); } +void Parser::ParseOpenACCCacheVar() { + ExprResult ArrayName = ParseOpenACCIDExpression(); + // FIXME: Pass this to Sema. + (void)ArrayName; + + //

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

2023-12-05 Thread via cfe-commits
@@ -268,6 +270,71 @@ ExprResult Parser::ParseOpenACCRoutineName() { return getActions().CorrectDelayedTyposInExpr(Res); } +void Parser::ParseOpenACCCacheVar() { + ExprResult ArrayName = ParseOpenACCIDExpression(); + // FIXME: Pass this to Sema. + (void)ArrayName; + + //

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

2023-12-05 Thread via cfe-commits
@@ -268,6 +270,71 @@ ExprResult Parser::ParseOpenACCRoutineName() { return getActions().CorrectDelayedTyposInExpr(Res); } +void Parser::ParseOpenACCCacheVar() { cor3ntin wrote: Maybe it would be nice to do like C and C++, ie citing the standard + grammar p

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

2023-12-05 Thread via cfe-commits
@@ -268,6 +270,71 @@ ExprResult Parser::ParseOpenACCRoutineName() { return getActions().CorrectDelayedTyposInExpr(Res); } +void Parser::ParseOpenACCCacheVar() { + ExprResult ArrayName = ParseOpenACCIDExpression(); + // FIXME: Pass this to Sema. + (void)ArrayName; + + //

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

2023-12-05 Thread via cfe-commits
@@ -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:

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

2023-12-05 Thread Alexey Bataev via cfe-commits
https://github.com/alexey-bataev approved this pull request. https://github.com/llvm/llvm-project/pull/74324 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2023-12-05 Thread Erich Keane via cfe-commits
https://github.com/erichkeane updated https://github.com/llvm/llvm-project/pull/74324 >From 31fe05335fce5f7c593e4c3f3595c548cf54bba0 Mon Sep 17 00:00:00 2001 From: erichkeane Date: Wed, 29 Nov 2023 11:12:02 -0800 Subject: [PATCH 1/2] [OpenACC] Implement 'cache' construct parsing The 'cache' co

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

2023-12-05 Thread Erich Keane via cfe-commits
@@ -298,7 +367,18 @@ void Parser::ParseOpenACCDirective() { T.consumeClose(); break; } +case OpenACCDirectiveKind::Cache: + ParseOpenACCCacheVarList(); + // The ParseOpenACCCacheVarList function manages to recover from failures, + // so we

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

2023-12-05 Thread Alexey Bataev via cfe-commits
@@ -298,7 +367,18 @@ void Parser::ParseOpenACCDirective() { T.consumeClose(); break; } +case OpenACCDirectiveKind::Cache: + ParseOpenACCCacheVarList(); + // The ParseOpenACCCacheVarList function manages to recover from failures, + // so we

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

2023-12-05 Thread Erich Keane via cfe-commits
@@ -298,7 +367,18 @@ void Parser::ParseOpenACCDirective() { T.consumeClose(); break; } +case OpenACCDirectiveKind::Cache: + ParseOpenACCCacheVarList(); + // The ParseOpenACCCacheVarList function manages to recover from failures, + // so we

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

2023-12-05 Thread Alexey Bataev via cfe-commits
@@ -298,7 +367,18 @@ void Parser::ParseOpenACCDirective() { T.consumeClose(); break; } +case OpenACCDirectiveKind::Cache: + ParseOpenACCCacheVarList(); + // The ParseOpenACCCacheVarList function manages to recover from failures, + // so we

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

2023-12-04 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Erich Keane (erichkeane) Changes The 'cache' construct takes a list of 'vars', which are array-section style definitions. This patch implements the parsing, leaving the lower bound and length of the bound as expressions, so that we can va

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

2023-12-04 Thread Erich Keane via cfe-commits
https://github.com/erichkeane created https://github.com/llvm/llvm-project/pull/74324 The 'cache' construct takes a list of 'vars', which are array-section style definitions. This patch implements the parsing, leaving the lower bound and length of the bound as expressions, so that we can valid