FLANG
assignment.h
1//===-- lib/Semantics/assignment.h ------------------------------*- C++ -*-===//
2//
3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4// See https://llvm.org/LICENSE.txt for license information.
5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6//
7//===----------------------------------------------------------------------===//
8
9#ifndef FORTRAN_SEMANTICS_ASSIGNMENT_H_
10#define FORTRAN_SEMANTICS_ASSIGNMENT_H_
11
12#include "flang/Common/indirection.h"
13#include "flang/Evaluate/expression.h"
14#include "flang/Semantics/semantics.h"
15
16namespace Fortran::parser {
18struct AssignmentStmt;
19struct EndWhereStmt;
24struct WhereStmt;
25} // namespace Fortran::parser
26
27namespace Fortran::semantics {
28
30class Scope;
31class Symbol;
32
33// Applies checks from C1594(5-6) on copying pointers in pure subprograms
34bool CheckCopyabilityInPureScope(parser::ContextualMessages &,
35 const evaluate::Expr<evaluate::SomeType> &, const Scope &);
36
37class AssignmentChecker : public virtual BaseChecker {
38public:
39 explicit AssignmentChecker(SemanticsContext &);
40 ~AssignmentChecker();
41 void Enter(const parser::OmpDeclareReductionDirective &x);
42 void Enter(const parser::AssignmentStmt &);
43 void Enter(const parser::PointerAssignmentStmt &);
44 void Enter(const parser::ImageSelectorSpec &);
45 void Enter(const parser::WhereStmt &);
46 void Leave(const parser::WhereStmt &);
47 void Enter(const parser::WhereConstructStmt &);
48 void Leave(const parser::EndWhereStmt &);
49 void Enter(const parser::MaskedElsewhereStmt &);
50 void Leave(const parser::MaskedElsewhereStmt &);
51
52 SemanticsContext &context();
53
54private:
56};
57
58} // namespace Fortran::semantics
59
60extern template class Fortran::common::Indirection<
62#endif // FORTRAN_SEMANTICS_ASSIGNMENT_H_
Definition indirection.h:31
Definition message.h:399
Definition assignment.cpp:31
Definition scope.h:68
Definition semantics.h:71
Definition symbol.h:916
Definition check-expression.h:19
Definition parse-tree.h:2059
Definition parse-tree.h:1722
Definition parse-tree.h:2116
Definition parse-tree.h:2081
Definition parse-tree.h:2100
Definition parse-tree.h:2094
Definition semantics.h:511