================ @@ -501,20 +501,28 @@ class OpenACCClauseWithExprs : public OpenACCClauseWithParams { /// Used only for initialization, the leaf class can initialize this to /// trailing storage. - void setExprs(MutableArrayRef<Expr *> NewExprs) { - assert(Exprs.empty() && "Cannot change Exprs list"); - Exprs = NewExprs; + void setExprs(MutableArrayRef<Expr *> NewStorage) { + assert(Storage.empty() && "Cannot change Exprs list"); + Storage = NewStorage; + } + + /// Used only for initialization, the leaf class can initialize this to + /// trailing storage, and initialize the data in the trailing storage as well. + void setExprs(MutableArrayRef<Expr *> NewStorage, ArrayRef<Expr *> Exprs) { + assert(NewStorage.size() == Exprs.size()); ---------------- erichkeane wrote:
The reason it is `Storage` here, is because there isn't valid data in the `NewStorage` array, it is uninitialized data meant to represent the data 'location'. It isn't `Exprs` until after the `uninitialized_copy`. https://github.com/llvm/llvm-project/pull/139749 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits