[flang-commits] [flang] [flang][OpenMP] Implement OpenMP stylized expressions (PR #165049)
Tom Eccles via flang-commits
flang-commits at lists.llvm.org
Mon Oct 27 05:29:52 PDT 2025
================
@@ -3532,6 +3536,33 @@ struct OmpObjectList {
WRAPPER_CLASS_BOILERPLATE(OmpObjectList, std::list<OmpObject>);
};
+struct OmpStylizedDeclaration {
+ COPY_AND_ASSIGN_BOILERPLATE(OmpStylizedDeclaration);
+ // Since "Reference" isn't handled by parse-tree-visitor, add EmptyTrait,
+ // and visit the members by hand when needed.
+ using EmptyTrait = std::true_type;
+ common::Reference<const OmpTypeName> type;
+ EntityDecl var;
+};
+
+struct OmpStylizedInstance {
+ struct Instance {
+ UNION_CLASS_BOILERPLATE(Instance);
+ std::variant<AssignmentStmt, CallStmt, common::Indirection<Expr>> u;
+ };
+ TUPLE_CLASS_BOILERPLATE(OmpStylizedInstance);
+ std::tuple<std::list<OmpStylizedDeclaration>, Instance> t;
+};
+
+class ParseState;
+
+struct OmpStylizedExpression {
+ CharBlock source;
+ const ParseState *state{nullptr};
----------------
tblah wrote:
I think this would be better as a std::unique_ptr. It seems easy to forget to delete this.
https://github.com/llvm/llvm-project/pull/165049
More information about the flang-commits
mailing list