[flang-commits] [PATCH] D142773: [flang] Fix ENUMERATOR declarations in nested scopes

Peter Klausler via Phabricator via flang-commits flang-commits at lists.llvm.org
Sun Jan 29 15:55:49 PST 2023


This revision was automatically updated to reflect the committed changes.
Closed by commit rGfac00d1b5d39: [flang] Fix ENUMERATOR declarations in nested scopes (authored by klausler).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D142773/new/

https://reviews.llvm.org/D142773

Files:
  flang/lib/Semantics/resolve-names.cpp


Index: flang/lib/Semantics/resolve-names.cpp
===================================================================
--- flang/lib/Semantics/resolve-names.cpp
+++ flang/lib/Semantics/resolve-names.cpp
@@ -4256,7 +4256,7 @@
 
 bool DeclarationVisitor::Pre(const parser::Enumerator &enumerator) {
   const parser::Name &name{std::get<parser::NamedConstant>(enumerator.t).v};
-  Symbol *symbol{FindSymbol(name)};
+  Symbol *symbol{FindInScope(name)};
   if (symbol && !symbol->has<UnknownDetails>()) {
     // Contrary to named constants appearing in a PARAMETER statement,
     // enumerator names should not have their type, dimension or any other


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D142773.493159.patch
Type: text/x-patch
Size: 643 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/flang-commits/attachments/20230129/c3d8ccf3/attachment.bin>


More information about the flang-commits mailing list