[PATCH] D84290: [Flang] Fix for the scenario when type guard has intrinsic type specification and Selector is NOT unlimited Polymorphic.

sameeran joshi via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 22 05:51:39 PDT 2020


sameeranjoshi added inline comments.


================
Comment at: flang/lib/Semantics/check-select-type.cpp:100
                       *derived, parser::FindSourceLocation(typeSpec));
                 }
                 return false;
----------------
inderjeet-hcl wrote:
> sameeranjoshi wrote:
> > How about adding an `else if ` statement here?
> > ```
> > if (){
> > ...
> > } else if (!selectorType_.IsUnlimitedPolymorphic() && spec->AsIntrinsic()) {  // C1162
> >   ...
> > }
> > ```
> I think either way is fine. I added 'if' condition at the beginning considering  if type specification is of intrinsic type then that should be the first check to be performed.
I think adding at beginning would never check `C1160`.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D84290





More information about the llvm-commits mailing list