[clang] [OpenACC] Private Clause on Compute Constructs (PR #90521)
Erich Keane via cfe-commits
cfe-commits at lists.llvm.org
Tue Apr 30 06:19:41 PDT 2024
================
@@ -958,13 +931,14 @@ Parser::OpenACCClauseParseResult Parser::ParseOpenACCClauseParams(
case OpenACCClauseKind::Link:
case OpenACCClauseKind::NoCreate:
case OpenACCClauseKind::Present:
- case OpenACCClauseKind::Private:
case OpenACCClauseKind::UseDevice:
- if (ParseOpenACCClauseVarList(ClauseKind)) {
- Parens.skipToEnd();
- return OpenACCCanContinue();
- }
+ ParseOpenACCVarList();
+ break;
+ case OpenACCClauseKind::Private: {
+ llvm::SmallVector<Expr *> Vars = ParseOpenACCVarList();
+ ParsedClause.setVarListDetails(std::move(Vars));
----------------
erichkeane wrote:
`ParsedClause` gets ownership of the vector and it is going out of scope, so it is to save the copy.
Though, I guess doing this whole section as a one liner makes it more clear.
https://github.com/llvm/llvm-project/pull/90521
More information about the cfe-commits
mailing list