[PATCH] D99342: [flang] Fix CHECK() calls on erroneous procedure declarations
Tim Keith via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Mar 25 16:39:14 PDT 2021
tskeith added inline comments.
================
Comment at: flang/lib/Semantics/resolve-names.cpp:3226
if (isGeneric()) {
- GetGenericDetails().AddSpecificProc(*symbol, name.source);
}
----------------
This was the only use of GetGenericDetails so you can eliminate it.
================
Comment at: flang/lib/Semantics/resolve-names.cpp:3235
+ Symbol *genericSymbol{GetGenericSymbol()};
+ if (genericSymbol->has<GenericDetails>()) {
+ genericSymbol->get<GenericDetails>().AddSpecificProc(
----------------
Since the assumption is that GetGenericSymbol always returns a non-null pointer, it would be better if it returned a reference instead to make that explicit.
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