1. Mar 07, 2019
  2. Mar 06, 2019
    • Tim Keith's avatar
      [flang] Create framework for checking statement semantics · 813e48dc
      Tim Keith authored
      Add `SemanticsVisitor` as the visitor class to perform statement
      semantics checks. Its template parameters are "checker" classes
      that perform the checks. They have `Enter` and `Leave` functions
      that are called for the corresponding parse tree nodes (`Enter`
      before the children, `Leave` after). Unlike `Pre` and `Post` in
      visitors they cannot prevent the parse tree walker from visiting
      child nodes.
      
      Existing checks have been incorporated into this framework:
      - `ExprChecker` replaces `AnalyzeExpressions()`
      - `AssignmentChecker` replaces `AnalyzeAssignments()`
      - `DoConcurrentChecker` replaces `CheckDoConcurrentConstraints()`
      
      Adding a new checker requires:
      - defining the checker class:
        - with BaseChecker as virtual base class
        - constructible from `SemanticsContext`
        - with Enter/Leave functions for nodes of interest
      - add the checker class to the template parameters of `StatementSemantics`
      
      Because these checkers and also `ResolveNamesVisitor` require tracking
      the current statement source location, that has been moved into
      `SemanticsContext`. `ResolveNamesVisitor` and `SemanticsVisitor`
      update the location when `Statement` nodes are encountered, making it
      available for error messages.
      
      `AnalyzeKindSelector()` now has access to the current statement through
      the context and so no longer needs to have it passed in.
      
      Test `assign01.f90` was added to verify that `AssignmentChecker` is
      actually doing something.
      
      Original-commit: flang-compiler/f18@3a222c36731029fabf026e5301dc60f0587595be
      Reviewed-on: https://github.com/flang-compiler/f18/pull/315
      Tree-same-pre-rewrite: false
      813e48dc
    • Peter Klausler's avatar
      [flang] Merge pull request flang-compiler/f18#311 from flang-compiler/pmk-struct-checks · 18329e25
      Peter Klausler authored
      More structure constructor semantics checking
      
      Original-commit: flang-compiler/f18@5561c9012c07c21cd043b0b0b8b2a03d6e42bebe
      Reviewed-on: https://github.com/flang-compiler/f18/pull/311
      18329e25
    • peter klausler's avatar
      [flang] Tweak API per review · 0987d31f
      peter klausler authored
      Original-commit: flang-compiler/f18@c0ab787cd1eb82a13fca9a473973b25e737da77a
      Reviewed-on: https://github.com/flang-compiler/f18/pull/311
      0987d31f
    • peter klausler's avatar
      [flang] Use value()/has_value() on Indirection class templates instead of operator*/operator-> · 6a0f9474
      peter klausler authored
      Original-commit: flang-compiler/f18@a97f377ae6051d877df82036983cc6209a2e0d95
      Reviewed-on: https://github.com/flang-compiler/f18/pull/311
      Tree-same-pre-rewrite: false
      6a0f9474
  3. Mar 05, 2019
  4. Mar 02, 2019
  5. Mar 01, 2019