[flang] Small improvements to name resolution
authorTim Keith <tkeith@nvidia.com>
Wed, 29 Aug 2018 18:38:12 +0000 (11:38 -0700)
committerTim Keith <tkeith@nvidia.com>
Wed, 29 Aug 2018 18:38:12 +0000 (11:38 -0700)
commitf69f7ecf48c3ab4d34c20edfd2d4bbf4b1cb5efc
treedb8f59592bc7d99116f7c055909badbdbc0812cc
parent2579c3a4cfcf1b73ee19228f1a038d3c64a49c1f
[flang] Small improvements to name resolution

Resolve names and do implicit typing in ArrayElement and LoopBounds.

Fix problem with creation of UseErrorDetails: when a conflict occurs,
record both the original USE and the new one.

Resolve the type name in TypeAttrSpec::Extends. Move CheckUseError to
DeclarationVisitor so that it can be used in ResolveDerivedType.

Report error on unresolved names. I.e. after name resolution, check each
parser::Name and verify we have a Symbol for it. This is on by default
now but it could be an option.

Original-commit: flang-compiler/f18@1c8cbc6e53cc7e1b6909bbedf5370e27fd11572f
Reviewed-on: https://github.com/flang-compiler/f18/pull/173
Tree-same-pre-rewrite: false
flang/lib/semantics/resolve-names.cc
flang/lib/semantics/rewrite-parse-tree.cc
flang/lib/semantics/rewrite-parse-tree.h
flang/lib/semantics/symbol.cc
flang/lib/semantics/symbol.h
flang/test/semantics/CMakeLists.txt
flang/test/semantics/resolve30.f90
flang/test/semantics/resolve31.f90 [new file with mode: 0644]