[flang-commits] [flang] [flang][OpenMP] Identify affected loops, provide reason (PR #185299)
Krzysztof Parzyszek via flang-commits
flang-commits at lists.llvm.org
Thu Mar 12 08:22:39 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(); }
+};
----------------
kparzysz wrote:
I've been considering using `parser::Messages` instead, not `parser::Message`. The Message alone needs storage, that's the primary reason why it was stored as `std::string`.
https://github.com/llvm/llvm-project/pull/185299
More information about the flang-commits
mailing list