[all-commits] [llvm/llvm-project] 539a6b: [flang] Detect use-before-decl errors on type para...
Peter Klausler via All-commits
all-commits at lists.llvm.org
Tue Jul 30 09:42:37 PDT 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 539a6b500c9c7a808e68db32bf7965985202197f
https://github.com/llvm/llvm-project/commit/539a6b500c9c7a808e68db32bf7965985202197f
Author: Peter Klausler <35819229+klausler at users.noreply.github.com>
Date: 2024-07-30 (Tue, 30 Jul 2024)
Changed paths:
M flang/include/flang/Semantics/symbol.h
M flang/include/flang/Semantics/tools.h
M flang/lib/Semantics/check-declarations.cpp
M flang/lib/Semantics/mod-file.cpp
M flang/lib/Semantics/resolve-names.cpp
M flang/lib/Semantics/runtime-type-info.cpp
M flang/lib/Semantics/symbol.cpp
M flang/lib/Semantics/tools.cpp
M flang/lib/Semantics/type.cpp
M flang/test/Semantics/resolve33.f90
Log Message:
-----------
[flang] Detect use-before-decl errors on type parameters (#99947)
Ensure that type parameters are declared as such before being referenced
within the derived type definition. (Previously, such references would
resolve to symbols in the enclosing scope.)
This change causes the symbols for the type parameters to be created
when the TYPE statement is processed in name resolution. They are
TypeParamDetails symbols with no KIND/LEN attribute set, and they shadow
any symbols of the same name in the enclosing scope.
When the type parameter declarations are processed, the KIND/LEN
attributes are set. Any earlier reference to a type parameter with no
KIND/LEN attribute elicits an error.
Some members of TypeParamDetails have been retyped &/or renamed.
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