================
@@ -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
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to