[all-commits] [llvm/llvm-project] 99a0a1: [flang][parser] Better error recovery for SUBROUTI...

Peter Klausler via All-commits all-commits at lists.llvm.org
Tue Jul 30 11:19:45 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 99a0a12ad66b64616788619efbe2db52c066fbe2
      https://github.com/llvm/llvm-project/commit/99a0a12ad66b64616788619efbe2db52c066fbe2
  Author: Peter Klausler <35819229+klausler at users.noreply.github.com>
  Date:   2024-07-30 (Tue, 30 Jul 2024)

  Changed paths:
    M flang/lib/Parser/program-parsers.cpp
    M flang/lib/Parser/stmt-parser.h
    A flang/test/Parser/recovery04.f90

  Log Message:
  -----------
  [flang][parser] Better error recovery for SUBROUTINE/FUNCTION statements (#100664)

When there's an error in a SUBROUTINE or FUNCTION statement, errors
cascade quickly because the body of the subprogram or interface isn't in
the right context. So, if a SUBROUTINE or FUNCTION statement is
expected, and contains a SUBROUTINE or FUNCTION keyword, it counts as
one -- retain and emit any errors pertaining to the arguments or suffix,
recover to the end of the line if needed, and proceed.



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