FLANG
lib
Semantics
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
16
namespace
Fortran::parser
{
17
class
ContextualMessages
;
18
struct
AssignmentStmt
;
19
struct
EndWhereStmt;
20
struct
MaskedElsewhereStmt
;
21
struct
PointerAssignmentStmt
;
22
struct
WhereConstructStmt
;
23
struct
WhereStmt
;
24
}
// namespace Fortran::parser
25
26
namespace
Fortran::semantics {
27
28
class
AssignmentContext
;
29
class
Scope
;
30
class
Symbol
;
31
32
// Applies checks from C1594(5-6) on copying pointers in pure subprograms
33
bool
CheckCopyabilityInPureScope(parser::ContextualMessages &,
34
const
evaluate::Expr<evaluate::SomeType> &,
const
Scope
&);
35
36
class
AssignmentChecker :
public
virtual
BaseChecker
{
37
public
:
38
explicit
AssignmentChecker(
SemanticsContext
&);
39
~AssignmentChecker();
40
void
Enter(
const
parser::OpenMPDeclareReductionConstruct
&x);
41
void
Enter(
const
parser::AssignmentStmt
&);
42
void
Enter(
const
parser::PointerAssignmentStmt
&);
43
void
Enter(
const
parser::WhereStmt
&);
44
void
Leave(
const
parser::WhereStmt
&);
45
void
Enter(
const
parser::WhereConstructStmt
&);
46
void
Leave(
const
parser::EndWhereStmt &);
47
void
Enter(
const
parser::MaskedElsewhereStmt
&);
48
void
Leave(
const
parser::MaskedElsewhereStmt
&);
49
50
SemanticsContext
&context();
51
52
private
:
53
common::Indirection<AssignmentContext>
context_;
54
};
55
56
}
// namespace Fortran::semantics
57
58
extern
template
class
Fortran::common::Indirection
<
59
Fortran::semantics::AssignmentContext
>;
60
#endif
// FORTRAN_SEMANTICS_ASSIGNMENT_H_
Fortran::common::Indirection
Definition
indirection.h:31
Fortran::parser::ContextualMessages
Definition
message.h:384
Fortran::semantics::AssignmentContext
Definition
assignment.cpp:33
Fortran::semantics::Scope
Definition
scope.h:58
Fortran::semantics::SemanticsContext
Definition
semantics.h:67
Fortran::semantics::Symbol
Definition
symbol.h:778
Fortran::parser
Definition
check-expression.h:19
Fortran::parser::AssignmentStmt
Definition
parse-tree.h:2016
Fortran::parser::MaskedElsewhereStmt
Definition
parse-tree.h:2075
Fortran::parser::OpenMPDeclareReductionConstruct
Definition
parse-tree.h:4963
Fortran::parser::PointerAssignmentStmt
Definition
parse-tree.h:2040
Fortran::parser::WhereConstructStmt
Definition
parse-tree.h:2059
Fortran::parser::WhereStmt
Definition
parse-tree.h:2053
Fortran::semantics::BaseChecker
Definition
semantics.h:421
Generated on
for FLANG by
1.14.0