1 //===-- lib/Semantics/pointer-assignment.h --------------------------------===//
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
7 //===----------------------------------------------------------------------===//
9 #ifndef FORTRAN_SEMANTICS_POINTER_ASSIGNMENT_H_
10 #define FORTRAN_SEMANTICS_POINTER_ASSIGNMENT_H_
12 #include "flang/Evaluate/expression.h"
13 #include "flang/Parser/char-block.h"
14 #include "flang/Semantics/type.h"
17 namespace Fortran::evaluate::characteristics
{
18 struct DummyDataObject
;
21 namespace Fortran::semantics
{
23 class SemanticsContext
;
26 bool CheckPointerAssignment(
27 SemanticsContext
&, const evaluate::Assignment
&, const Scope
&);
28 bool CheckPointerAssignment(SemanticsContext
&, const SomeExpr
&lhs
,
29 const SomeExpr
&rhs
, const Scope
&, bool isBoundsRemapping
,
31 bool CheckPointerAssignment(SemanticsContext
&, parser::CharBlock source
,
32 const std::string
&description
,
33 const evaluate::characteristics::DummyDataObject
&, const SomeExpr
&rhs
,
34 const Scope
&, bool isAssumedRank
);
36 bool CheckStructConstructorPointerComponent(
37 SemanticsContext
&, const Symbol
&lhs
, const SomeExpr
&rhs
, const Scope
&);
39 // Checks whether an expression is a valid static initializer for a
40 // particular pointer designator.
41 bool CheckInitialDataPointerTarget(SemanticsContext
&, const SomeExpr
&pointer
,
42 const SomeExpr
&init
, const Scope
&);
44 } // namespace Fortran::semantics
46 #endif // FORTRAN_SEMANTICS_POINTER_ASSIGNMENT_H_