[all-commits] [llvm/llvm-project] f2e808: [flang] Intermix messages from parser and semantic...

Peter Klausler via All-commits all-commits at lists.llvm.org
Wed May 1 13:49:56 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: f2e808932ceddf503897d0b5c75bc22fb3262349
      https://github.com/llvm/llvm-project/commit/f2e808932ceddf503897d0b5c75bc22fb3262349
  Author: Peter Klausler <35819229+klausler at users.noreply.github.com>
  Date:   2024-05-01 (Wed, 01 May 2024)

  Changed paths:
    M flang/examples/FeatureList/FeatureList.cpp
    M flang/include/flang/Frontend/FrontendAction.h
    M flang/include/flang/Semantics/semantics.h
    M flang/lib/Frontend/FrontendAction.cpp
    M flang/lib/Frontend/FrontendActions.cpp
    M flang/lib/Semantics/semantics.cpp
    A flang/test/Driver/message-merging.f90
    M flang/tools/bbc/bbc.cpp

  Log Message:
  -----------
  [flang] Intermix messages from parser and semantic analysis (#90654)

When there are one or more fatal error messages produced by the parser,
semantic analysis is not performed. But when there are messages produced
by the parser and none of them are fatal, those messages are emitted to
the user before compilation continues with semantic analysis, and any
messages produced by semantics are emitted after the messages from
parsing.

This can be confusing for the user, as the messages may no longer all be
in source file location order. It also makes it difficult to write tests
that check for both non-fatal messages from parsing as well as messages
from semantics using inline CHECK: or other expected messages in test
source code.

This patch ensures that if semantic analysis is performed, and non-fatal
messages were produced by the parser, that all the messages will be
combined and emitted in source file order.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list