[PATCH] D99342: [flang] Fix CHECK() calls on erroneous procedure declarations
Pete Steinfeld via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Mar 25 12:40:41 PDT 2021
PeteSteinfeld added inline comments.
================
Comment at: flang/lib/Semantics/resolve-names.cpp:2951
// add function result to function scope
- EntityDetails funcResultDetails;
- funcResultDetails.set_funcResult(true);
- funcInfo_.resultSymbol =
- &MakeSymbol(*funcResultName, std::move(funcResultDetails));
- details.set_result(*funcInfo_.resultSymbol);
+ if (details.get_result()) {
+ CHECK(context().HasError(currScope().symbol()));
----------------
tskeith wrote:
> You can use `details.isFunction()` here and avoid the need for a new accessor.
Thanks, Tim. That's a much better alternative.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D99342/new/
https://reviews.llvm.org/D99342
More information about the llvm-commits
mailing list