[clang] [OpenACC] Implement Sema work for OpenACC Clauses (PR #87821)
Erich Keane via cfe-commits
cfe-commits at lists.llvm.org
Mon Apr 8 08:12:03 PDT 2024
================
@@ -82,22 +119,22 @@ bool SemaOpenACC::ActOnStartStmtDirective(OpenACCDirectiveKind K,
return diagnoseConstructAppertainment(*this, K, StartLoc, /*IsStmt=*/true);
}
-StmtResult SemaOpenACC::ActOnEndStmtDirective(OpenACCDirectiveKind K,
- SourceLocation StartLoc,
- SourceLocation EndLoc,
- StmtResult AssocStmt) {
+StmtResult SemaOpenACC::ActOnEndStmtDirective(
+ OpenACCDirectiveKind K, SourceLocation StartLoc, SourceLocation EndLoc,
+ MutableArrayRef<OpenACCClause *> Clauses, StmtResult AssocStmt) {
----------------
erichkeane wrote:
It doesn't seem that `OwningArrayRef` is what I want, is it? That is an array-ref that copies the elements into a newly allocated 'thing'. My thought is that we want the call to `ActOnEndStmtDirective` to 'take' ownership of an existing allocation.
A part of me thinks I should perhaps be storing these as a `SmallVector<unique_ptr<OpenACCClause>>` instead, then taking that by value here, so it is clear that it 'owns' it.
https://github.com/llvm/llvm-project/pull/87821
More information about the cfe-commits
mailing list