[flang] Refactor Analyze(PointerAssignmentStmt)
authorTim Keith <tkeith@nvidia.com>
Thu, 16 Jan 2020 20:43:48 +0000 (12:43 -0800)
committerTim Keith <tkeith@nvidia.com>
Wed, 22 Jan 2020 21:50:02 +0000 (13:50 -0800)
commitd4a1bd7c9a2d382c0a4ea7ea3cd95707c5db1aba
treef6268836f18d7a7af0d15c29fce4e48536ca4eb0
parent0ac2761f2c9ec1ce189ef9c4849a5edbac235b8a
[flang] Refactor Analyze(PointerAssignmentStmt)

Use early returns to reduce the indentation.
Check LHS is a pointer as early as possible.
A PointerAssignmentStmt can only have a typedAssignment that
represents a PointerAssignment. So assert that is the case and
don't worry about the other cases.

Original-commit: flang-compiler/f18@bdf3d3a292b5f9ce4241e3d63b759bd61838cf18
Reviewed-on: https://github.com/flang-compiler/f18/pull/944
Tree-same-pre-rewrite: false
flang/lib/semantics/assignment.cc
flang/lib/semantics/pointer-assignment.cc