[flang-commits] [flang] [flang][openacc] Make OpenACC block construct parse errors less verbose. (PR #131042)

Andre Kuhlenschmidt via flang-commits flang-commits at lists.llvm.org
Wed Mar 19 08:57:02 PDT 2025


================
@@ -272,19 +272,51 @@ static llvm::raw_ostream::Colors PrefixColor(Severity severity) {
   return llvm::raw_ostream::SAVEDCOLOR;
 }
 
+// TODO: Make these configurable, based on verbosity level.
+static constexpr int MAX_CONTEXTS_EMITTED{2};
+static constexpr bool OMIT_SHARED_CONTEXTS{true};
+
 void Message::Emit(llvm::raw_ostream &o, const AllCookedSources &allCooked,
     bool echoSourceLine) const {
   std::optional<ProvenanceRange> provenanceRange{GetProvenanceRange(allCooked)};
   const AllSources &sources{allCooked.allSources()};
   sources.EmitMessage(o, provenanceRange, ToString(), Prefix(severity()),
       PrefixColor(severity()), echoSourceLine);
+  // Always refers to whether the attachment in the loop below is a context.
----------------
akuhlens wrote:

https://github.com/llvm/llvm-project/blob/480202f0d16f7dbc5c650aea6e8dfd9eca5b999d/flang/include/flang/Parser/message.h#L273

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


More information about the flang-commits mailing list