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
ImageSelectorSpec
;
21
struct
MaskedElsewhereStmt
;
22
struct
PointerAssignmentStmt
;
23
struct
WhereConstructStmt
;
24
struct
WhereStmt
;
25
}
// namespace Fortran::parser
26
27
namespace
Fortran::semantics {
28
29
class
AssignmentContext
;
30
class
Scope
;
31
class
Symbol
;
32
33
// Applies checks from C1594(5-6) on copying pointers in pure subprograms
34
bool
CheckCopyabilityInPureScope(parser::ContextualMessages &,
35
const
evaluate::Expr<evaluate::SomeType> &,
const
Scope
&);
36
37
class
AssignmentChecker :
public
virtual
BaseChecker
{
38
public
:
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
54
private
:
55
common::Indirection<AssignmentContext>
context_;
56
};
57
58
}
// namespace Fortran::semantics
59
60
extern
template
class
Fortran::common::Indirection
<
61
Fortran::semantics::AssignmentContext
>;
62
#endif
// FORTRAN_SEMANTICS_ASSIGNMENT_H_
Fortran::common::Indirection
Definition
indirection.h:31
Fortran::parser::ContextualMessages
Definition
message.h:399
Fortran::semantics::AssignmentContext
Definition
assignment.cpp:31
Fortran::semantics::Scope
Definition
scope.h:68
Fortran::semantics::SemanticsContext
Definition
semantics.h:71
Fortran::semantics::Symbol
Definition
symbol.h:916
Fortran::parser
Definition
check-expression.h:19
Fortran::parser::AssignmentStmt
Definition
parse-tree.h:2059
Fortran::parser::ImageSelectorSpec
Definition
parse-tree.h:1722
Fortran::parser::MaskedElsewhereStmt
Definition
parse-tree.h:2116
Fortran::parser::OmpDeclareReductionDirective
Definition
parse-tree.h:5465
Fortran::parser::PointerAssignmentStmt
Definition
parse-tree.h:2081
Fortran::parser::WhereConstructStmt
Definition
parse-tree.h:2100
Fortran::parser::WhereStmt
Definition
parse-tree.h:2094
Fortran::semantics::BaseChecker
Definition
semantics.h:511
Generated on
for FLANG by
1.14.0