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::evaluate { 22 class FoldingContext; 23 } 24 25 namespace Fortran::semantics { 26 27 class Symbol; 28 29 bool CheckPointerAssignment( 30 evaluate::FoldingContext &, const evaluate::Assignment &); 31 bool CheckPointerAssignment(evaluate::FoldingContext &, const SomeExpr &lhs, 32 const SomeExpr &rhs, bool isBoundsRemapping = false); 33 bool CheckPointerAssignment( 34 evaluate::FoldingContext &, const Symbol &lhs, const SomeExpr &rhs); 35 bool CheckPointerAssignment(evaluate::FoldingContext &, 36 parser::CharBlock source, const std::string &description, 37 const evaluate::characteristics::DummyDataObject &, const SomeExpr &rhs); 38 39 // Checks whether an expression is a valid static initializer for a 40 // particular pointer designator. 41 bool CheckInitialTarget( 42 evaluate::FoldingContext &, const SomeExpr &pointer, const SomeExpr &init); 43 44 } // namespace Fortran::semantics 45 46 #endif // FORTRAN_SEMANTICS_POINTER_ASSIGNMENT_H_ 47