1 //===-- lib/Semantics/pointer-assignment.h --------------------------------===// 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_POINTER_ASSIGNMENT_H_ 10 #define FORTRAN_SEMANTICS_POINTER_ASSIGNMENT_H_ 11 12 #include "flang/Evaluate/expression.h" 13 #include "flang/Parser/char-block.h" 14 #include "flang/Semantics/type.h" 15 #include <string> 16 17 namespace Fortran::evaluate::characteristics { 18 struct DummyDataObject; 19 } 20 21 namespace Fortran::semantics { 22 23 class SemanticsContext; 24 class Symbol; 25 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, 30 bool isAssumedRank); 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); 35 36 bool CheckStructConstructorPointerComponent( 37 SemanticsContext &, const Symbol &lhs, const SomeExpr &rhs, const Scope &); 38 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 &); 43 44 } // namespace Fortran::semantics 45 46 #endif // FORTRAN_SEMANTICS_POINTER_ASSIGNMENT_H_ 47