[clang] [OpenACC] Private Clause on Compute Constructs (PR #90521)
Erich Keane via cfe-commits
cfe-commits at lists.llvm.org
Tue Apr 30 08:00:29 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:
Right, `Vars` was immediately going out of scope, so it has no need for its elements anymore, so passing as a 'copy' is not necessary. BUT I've changed it to be an inlined call, so THIS std::move is gone.
https://github.com/llvm/llvm-project/pull/90521
More information about the cfe-commits
mailing list