[llvm-branch-commits] [flang] [flang][OpenMP] Identify affected loops, provide reason (PR #185299)
Michael Kruse via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Thu Mar 12 05:58:52 PDT 2026
================
@@ -109,20 +112,64 @@ bool IsPointerAssignment(const evaluate::Assignment &x);
MaybeExpr MakeEvaluateExpr(const parser::OmpStylizedInstance &inp);
+// A representation of a "because" message. The `text` member is a formatted
+// message (i.e. without any printf-like formatting characters like %d, etc).
+// `source` is the location to which the "because" message will refer.
+struct Reason {
+ std::string text;
+ parser::CharBlock source;
+
+ Reason() = default;
+ Reason(const std::string t, parser::CharBlock s) : text(t), source(s) {}
+ operator bool() const { return !source.empty(); }
+};
----------------
Meinersbur wrote:
Could Flang's `parser::Message` be used for this, instead introducing OpenMP-specific diagnistic infrastructure?
https://github.com/llvm/llvm-project/pull/185299
More information about the llvm-branch-commits
mailing list