[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:59:24 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:

Ah! I didn't know you could do the second option. I will look into that. This comment was created because I too thought that that variable would be talking about this* initially, but it does not according to SetContext above.


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


More information about the flang-commits mailing list