[clang] [OpenACC][NFC] Add OpenACC Clause AST Nodes/infrastructure (PR #87675)

Erich Keane via cfe-commits cfe-commits at lists.llvm.org
Thu Apr 4 13:01:03 PDT 2024


================
@@ -30,13 +31,23 @@ class OpenACCConstructStmt : public Stmt {
   /// the directive.
   SourceRange Range;
 
-  // TODO OPENACC: Clauses should probably be collected in this class.
+  /// The list of clauses.  This is stored here as an ArrayRef, as this is the
----------------
erichkeane wrote:

Most of this patch is just boilerplate, but THIS decision I think is the important one.  I could EITHER have the base clause store an `llvm::SmallVector` of clause pointers, OR do the trailing storage trick I'm doing here.  The trailing-storage seemed closest to being what OMP does, but is a bit extra rigamarole to make work.

https://github.com/llvm/llvm-project/pull/87675


More information about the cfe-commits mailing list