[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 16:56:04 PDT 2021


PeteSteinfeld added inline comments.


================
Comment at: flang/lib/Semantics/resolve-names.cpp:3226
     if (isGeneric()) {
-      GetGenericDetails().AddSpecificProc(*symbol, name.source);
     }
----------------
tskeith wrote:
> This was the only use of GetGenericDetails so you can eliminate it.
Thanks, Tim.  Will do.


================
Comment at: flang/lib/Semantics/resolve-names.cpp:3235
+      Symbol *genericSymbol{GetGenericSymbol()};
+      if (genericSymbol->has<GenericDetails>()) {
+        genericSymbol->get<GenericDetails>().AddSpecificProc(
----------------
tskeith wrote:
> 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.
Thanks, Tim.  Will do.


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