[all-commits] [llvm/llvm-project] a18366: [flang] Move check for statement function in BLOCK...

Peter Klausler via All-commits all-commits at lists.llvm.org
Thu Mar 2 13:48:23 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: a183668ac6ce276941dd43dddd3eb08a4ed30aa8
      https://github.com/llvm/llvm-project/commit/a183668ac6ce276941dd43dddd3eb08a4ed30aa8
  Author: Peter Klausler <pklausler at nvidia.com>
  Date:   2023-03-02 (Thu, 02 Mar 2023)

  Changed paths:
    M flang/lib/Semantics/check-declarations.cpp
    M flang/lib/Semantics/resolve-names.cpp
    M flang/test/Semantics/blockconstruct01.f90

  Log Message:
  -----------
  [flang] Move check for statement function in BLOCK construct

A BLOCK construct may not contain a statement function definition;
but it may of course contain an assignment statement with an array
element on its left-hand side that looks like a statement function
definition.  These misparsed statement functions are converted
into assignment statements during semantics once it is clear what
they are.  Move the C1107 check for a statement function definition
in a block construct into declaration checking, which is where it
probably should have been in the first place anyway.

Differential Revision: https://reviews.llvm.org/D145112




More information about the All-commits mailing list