llvm/flang/lib/semantics
Tim Keith 9ef62dbb6a [flang] Resolve and check names in equivalence sets
Collect sets of `parser::EquivalenceObject` to process at the end of
the specification part. This is so that names mentioned in the
EQUIVALENCE statement don't trigger implicit declarations.

The `EquivalenceSets` class performs most of the numerous checks
on objects that can be in equivalence sets at all and objects that
can be in them together. It also merges sets when the same object
appears in more than one.

Once equivalence sets are checked they are added to the `Scope`.
Further checks will be necessary after the size and alignment of
variables are computed.

Add `FindUltimateComponent` to simplify checks on ultimate components
of derived types. Use it to implement `HasCoarrayUltimateComponent`
and checks on equivalence objects.

Make `ExpressionAnalyzer::Analyze(Designator)` public so that
`parser::EquivalenceObject` can be analyzed.

Add `GetDefaultKind`, `doublePrecisionKind`, and `quadPrecisionKind`
to `SemanticsContext` so that `defaultKinds_` does not need to be
accessed directly.

Original-commit: flang-compiler/f18@1cc898e5b8
Reviewed-on: https://github.com/flang-compiler/f18/pull/494
Tree-same-pre-rewrite: false
2019-06-11 18:26:48 -07:00
..
assignment.cc [flang] Resolve and check names in equivalence sets 2019-06-11 18:26:48 -07:00
assignment.h [flang] Remove OwningPointer and ForwardReference 2019-05-06 07:51:07 -07:00
attr.cc [flang] Changed .clang-format so that it will not add a comment after the closing brace of each namespace. Removed all such previous comments from all .cc and .h files 2018-10-25 05:55:23 -07:00
attr.h [flang] Changed .clang-format so that it will not add a comment after the closing brace of each namespace. Removed all such previous comments from all .cc and .h files 2018-10-25 05:55:23 -07:00
canonicalize-do.cc [flang] Simplify Semantics::Perform 2019-03-06 17:07:25 -08:00
canonicalize-do.h [flang] Simplify Semantics::Perform 2019-03-06 17:07:25 -08:00
check-allocate.cc [flang] Fix two bugs 2019-06-04 17:03:34 -07:00
check-allocate.h [flang] First batch of semantics checks for allocate 2019-04-23 03:05:56 -07:00
check-arithmeticif.cc [flang] work in progress 2019-05-20 13:37:28 -07:00
check-arithmeticif.h [flang] Cleanup -- Remove unnecessary inline keyword, 2019-04-11 15:20:14 -07:00
check-coarray.cc [flang] work in progress 2019-05-20 13:37:28 -07:00
check-coarray.h [flang] Save and fetch analyzed Expr in Variable 2019-04-18 17:48:55 -07:00
check-deallocate.cc [flang] Move HasError, SetError to SemanticsContext 2019-04-25 14:47:39 -07:00
check-deallocate.h [flang] Cleanup -- Remove unnecessary inline keyword, 2019-04-11 15:20:14 -07:00
check-do.cc [flang] Fixed situations where multiple error messages were being emitted. 2019-06-10 15:10:32 -07:00
check-do.h [flang] Renamed check.*do.*stmt to check.*do to better conform with the grammar. 2019-06-10 14:03:24 -07:00
check-if-stmt.cc [flang] Reactivate tree-driven constraint checking on expressions. 2019-04-15 09:41:41 -07:00
check-if-stmt.h [flang] Cleanup -- Remove unnecessary inline keyword, 2019-04-11 15:20:14 -07:00
check-io.cc [flang] Resolve and check names in equivalence sets 2019-06-11 18:26:48 -07:00
check-io.h [flang] work in progress 2019-05-20 13:37:28 -07:00
check-nullify.cc [flang] Move HasError, SetError to SemanticsContext 2019-04-25 14:47:39 -07:00
check-nullify.h [flang] Cleanup -- Remove unnecessary inline keyword, 2019-04-11 15:20:14 -07:00
check-return.cc [flang] FindContainingSubprogram returns a pointer, not a reference. 2019-04-15 10:59:12 -07:00
check-return.h [flang] Implement semantic checks for return and alt-return. 2019-04-15 10:59:12 -07:00
check-stop.cc [flang] Use SomeExpr rather than GenericExprWrapper in checkers 2019-04-19 08:22:28 -07:00
check-stop.h [flang] Semantics checker for STOP and ERROR STOP statements - post review changes 2019-04-17 14:13:23 -07:00
CMakeLists.txt [flang] Renamed check.*do.*stmt to check.*do to better conform with the grammar. 2019-06-10 14:03:24 -07:00
expression.cc [flang] Resolve and check names in equivalence sets 2019-06-11 18:26:48 -07:00
expression.h [flang] Resolve and check names in equivalence sets 2019-06-11 18:26:48 -07:00
mod-file.cc [flang] Rearrange references to AllSources singleton, fix FindScope for module files 2019-06-04 13:37:09 -07:00
mod-file.h [flang] Simplify Semantics::Perform 2019-03-06 17:07:25 -08:00
program-tree.cc [flang] Move ProgramTree to its own file 2019-05-06 10:12:27 -07:00
program-tree.h [flang] Move ProgramTree to its own file 2019-05-06 10:12:27 -07:00
resolve-labels.cc [flang] Replace formatting of CharBlock & string 2019-05-07 09:24:32 -07:00
resolve-labels.h [flang] Changed .clang-format so that it will not add a comment after the closing brace of each namespace. Removed all such previous comments from all .cc and .h files 2018-10-25 05:55:23 -07:00
resolve-names-utils.cc [flang] Resolve and check names in equivalence sets 2019-06-11 18:26:48 -07:00
resolve-names-utils.h [flang] Resolve and check names in equivalence sets 2019-06-11 18:26:48 -07:00
resolve-names.cc [flang] Resolve and check names in equivalence sets 2019-06-11 18:26:48 -07:00
resolve-names.h [flang] Simplify Semantics::Perform 2019-03-06 17:07:25 -08:00
rewrite-parse-tree.cc [flang] Remove support for Names in messages for now. 2019-05-07 10:04:21 -07:00
rewrite-parse-tree.h [flang] Simplify Semantics::Perform 2019-03-06 17:07:25 -08:00
scope.cc [flang] Resolve and check names in equivalence sets 2019-06-11 18:26:48 -07:00
scope.h [flang] Resolve and check names in equivalence sets 2019-06-11 18:26:48 -07:00
semantics.cc [flang] Resolve and check names in equivalence sets 2019-06-11 18:26:48 -07:00
semantics.h [flang] Resolve and check names in equivalence sets 2019-06-11 18:26:48 -07:00
symbol.cc [flang] Allow for FINAL procedures in PDT instantiation 2019-06-04 13:37:17 -07:00
symbol.h [flang] allow alternate return indicators 2019-06-04 13:37:20 -07:00
tools.cc [flang] Resolve and check names in equivalence sets 2019-06-11 18:26:48 -07:00
tools.h [flang] Resolve and check names in equivalence sets 2019-06-11 18:26:48 -07:00
type.cc [flang] Reformatting before merging 2019-05-30 16:39:23 -07:00
type.h [flang] Resolve and check names in equivalence sets 2019-06-11 18:26:48 -07:00
unparse-with-symbols.cc [flang] Change when symbol is set in parser::Name 2018-12-06 07:16:52 -08:00
unparse-with-symbols.h [flang] Changed .clang-format so that it will not add a comment after the closing brace of each namespace. Removed all such previous comments from all .cc and .h files 2018-10-25 05:55:23 -07:00