llvm/flang/lib/parser
Tim Keith ed94af4c47 [flang] More name resolution for construct entities
Push a new scope for constructs and statements that require one
(DataStmt, DO CONCURRENT, ForallConstruct, ForallStmt -- there are more
to do). Currently we use the Block kind of scope because there is no
difference. Perhaps that kind should be renamed to Construct, though it
does apply to statements as well as constructs.

Add DeclareConstructEntity to create a construct or statement entity.
When the type is not specified it can come from the type of a symbol in
the enclosing scope with the same name. Change DeclareObjectEntity et al.
to return the symbol declared, for the benefit of DeclareConstructEntity.

Use DeclareConstructEntity for DO CONCURRENT index-name, LOCAL, and
LOCAL_INIT variables and the data-i-do-variable in DataImpliedDo

Names in SHARED locality spec need special handling: create a new kinds
of symbol with HostAssocDetails to represent the host-association of the
shared variables within the construct scope. That symbol gets the
LocalityShared flag without affecting the symbol in the outer scope.
HostAssoc symbols may be useful in other contexts, e.g. up-level
references to local variables.

Add parser::DoConstruct::IsDoConcurrent() because DO CONCURRENT loops
introduce a construct scope while other DO loops do not.

Move CanonicalizeDo to before name resolution so that name resolution
doesn't have to deal with labeled DO CONCURRENT loops.

Allow for type of index name to be specified in ConcurrentHeader.

Resolve the derived type name in an AllocateStmt, StructureConstructor

Original-commit: flang-compiler/f18@bc7b989136
Reviewed-on: https://github.com/flang-compiler/f18/pull/214
2018-10-18 09:06:11 -07:00
..
basic-parsers.h [flang] Changes that might fix MSVC build problems from sjs 2018-09-25 15:23:59 -07:00
char-block.h [flang] review comments 2018-10-15 13:39:51 -07:00
char-buffer.cc [flang] unit testing, better error messages 2018-10-12 16:02:41 -07:00
char-buffer.h [flang] unit testing, better error messages 2018-10-12 16:02:41 -07:00
char-set.cc [flang] Normalize namespace definitions. 2018-05-02 13:52:36 -07:00
char-set.h [flang] Normalize namespace definitions. 2018-05-02 13:52:36 -07:00
characters.cc [flang] Use std::nullopt in place of empty braces in return statements. 2018-08-03 16:23:57 -07:00
characters.h [flang] Use std::nullopt in place of empty braces in return statements. 2018-08-03 16:23:57 -07:00
CMakeLists.txt [flang] Rearrange some facilities into a new lib/common. 2018-06-18 11:05:17 -07:00
debug-parser.cc [flang] Clean up messaging: make Say() member function templates more flexible, hide MessageFormattedText instances 2018-08-09 10:17:40 -07:00
debug-parser.h [flang] Normalize namespace definitions. 2018-05-02 13:52:36 -07:00
features.h [flang] mixed Complex; removed BOZConstant in favor of converting in place 2018-09-12 16:29:13 -07:00
format-specification.h [flang] Normalize namespace definitions. 2018-05-02 13:52:36 -07:00
grammar.h [flang] Correct the spelling of LOCAL_INIT clauses on DO CONCURRENT statements. 2018-10-02 10:03:37 -07:00
instrumented-parser.cc [flang] Use braces in auto initializers. 2018-07-11 10:21:32 -07:00
instrumented-parser.h [flang] Use std::nullopt in place of empty braces in return statements. 2018-08-03 16:23:57 -07:00
message.cc [flang] expression analysis 2018-09-12 16:28:49 -07:00
message.h [flang] work on structure components 2018-09-25 15:23:58 -07:00
openmp-grammar.h [flang] Resolve recent NAG failures better, more clean-up, ready for merge. 2018-09-13 11:29:10 -07:00
parse-state.h [flang] Clean up messaging: make Say() member function templates more flexible, hide MessageFormattedText instances 2018-08-09 10:17:40 -07:00
parse-tree-visitor.h [flang] Prep for review 2018-10-04 13:55:51 -07:00
parse-tree.cc [flang] More name resolution for construct entities 2018-10-18 09:06:11 -07:00
parse-tree.h [flang] More name resolution for construct entities 2018-10-18 09:06:11 -07:00
parsing.cc [flang] Clean up messaging: make Say() member function templates more flexible, hide MessageFormattedText instances 2018-08-09 10:17:40 -07:00
parsing.h [flang] add isModuleFile flag to parser::Options, use it 2018-07-27 15:18:36 -07:00
preprocessor.cc [flang] Clean up messaging: make Say() member function templates more flexible, hide MessageFormattedText instances 2018-08-09 10:17:40 -07:00
preprocessor.h [flang] Normalize namespace definitions. 2018-05-02 13:52:36 -07:00
prescan.cc [flang] Clean up messaging: make Say() member function templates more flexible, hide MessageFormattedText instances 2018-08-09 10:17:40 -07:00
prescan.h [flang] Clean up messaging: make Say() member function templates more flexible, hide MessageFormattedText instances 2018-08-09 10:17:40 -07:00
provenance.cc [flang] Let multiple CookedSource instances share a ref-counted AllSources. 2018-07-27 14:58:14 -07:00
provenance.h [flang] unit testing, better error messages 2018-10-12 16:02:41 -07:00
source.cc [flang] fix double deallocation bug from previous commit 2018-07-27 13:27:33 -07:00
source.h [flang] fix double deallocation bug from previous commit 2018-07-27 13:27:33 -07:00
stmt-parser.h [flang] Resolve recent NAG failures better, more clean-up, ready for merge. 2018-09-13 11:29:10 -07:00
token-parsers.h [flang] Canonicalize nonstandard BOZ literals to avoid spurious parse/unparse/reparse/unparse failures. 2018-08-09 10:17:44 -07:00
token-sequence.cc [flang] address review comment 2018-05-11 14:23:18 -07:00
token-sequence.h [flang] a little more refinement 2018-05-11 12:54:49 -07:00
type-parsers.h [flang] Merge pull request flang-compiler/f18#137 from flang-compiler/omppar 2018-07-20 15:49:19 -07:00
unparse.cc [flang] Use fundamental types in overloadings of Unparse. 2018-10-10 07:24:27 -07:00
unparse.h [flang] Really fix backslash escapes. 2018-07-19 15:35:55 -07:00
user-state.cc [flang] Parse nonlabel DO within label DO better; add -fdebug-semantics; more testing 2018-10-04 13:54:07 -07:00
user-state.h [flang] Parse nonlabel DO within label DO better; add -fdebug-semantics; more testing 2018-10-04 13:54:07 -07:00