[flang-commits] [flang] [flang] Improve error for misplaced statement after CONTAINS in derived type (PR #215886)

via flang-commits flang-commits at lists.llvm.org
Fri Aug 14 11:03:55 PDT 2026


================
@@ -228,13 +230,18 @@ template <typename PA> class WithMessageParser {
       messages.Annex(std::move(state.messages()));
     } else {
       emitMessage = true;
+      emitAtStart = true;
       if (hadAnyTokenMatched) {
         state.set_anyTokenMatched();
       }
     }
     state.messages() = std::move(messages);
     if (emitMessage) {
-      state.Say(text_);
+      if (emitAtStart) {
----------------
mleair wrote:

OK. That's fine. 

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


More information about the flang-commits mailing list