[llvm-branch-commits] [flang] [flang][OpenMP] Apply modifier representation to semantic checks (PR #116658)

Tom Eccles via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Wed Nov 20 06:57:43 PST 2024


================
@@ -3440,6 +3440,16 @@ struct OmpObject {
 
 WRAPPER_CLASS(OmpObjectList, std::list<OmpObject>);
 
+#define MODIFIER_BOILERPLATE(...) \
+  struct Modifier { \
+    using Variant = std::variant<__VA_ARGS__>; \
+    UNION_CLASS_BOILERPLATE(Modifier); \
+    CharBlock source; \
+    Variant u; \
+  }
+
+#define MODIFIERS() std::optional<std::list<Modifier>>
----------------
tblah wrote:

nit: why is this a macro rather than a type alias? It is okay if you have a good reason, it was just surprising for me to read.

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


More information about the llvm-branch-commits mailing list