[PATCH] D96631: [flang] Detect circularly defined procedures
Peter Klausler via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Feb 12 13:48:33 PST 2021
klausler accepted this revision.
klausler added inline comments.
This revision is now accepted and ready to land.
================
Comment at: flang/include/flang/Evaluate/characteristics.h:211
static std::optional<DummyProcedure> Characterize(
- const semantics::Symbol &, FoldingContext &context);
+ const semantics::Symbol &, FoldingContext &context, SeenProcs &);
llvm::raw_ostream &Dump(llvm::raw_ostream &) const;
----------------
As a convenience to external clients, this new argument could be either a pointer that default to nullptr, or there could be an overload without the set argument that declares one and passes it onward (my preference).
================
Comment at: flang/lib/Evaluate/characteristics.cpp:655
+ context.messages().Say(symbol.name(),
+ "Procedure '%s' depends on itself"_err_en_US, symbol.name());
+ return std::nullopt;
----------------
Please clarify this message so that the user can tell that the circular dependence is in the specification of the procedure's interface or characteristics.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D96631/new/
https://reviews.llvm.org/D96631
More information about the llvm-commits
mailing list