FLANG
check-call.h
1//===-- lib/Semantics/check-call.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// Constraint checking for procedure references
10
11#ifndef FORTRAN_SEMANTICS_CHECK_CALL_H_
12#define FORTRAN_SEMANTICS_CHECK_CALL_H_
13
14#include "flang/Evaluate/call.h"
15#include "flang/Parser/message.h"
16
17namespace Fortran::evaluate::characteristics {
18struct Procedure;
19}
20namespace Fortran::evaluate {
21class FoldingContext;
22}
23
24namespace Fortran::semantics {
25class Scope;
27
28// Argument treatingExternalAsImplicit should be true when the called procedure
29// does not actually have an explicit interface at the call site, but
30// its characteristics are known because it is a subroutine or function
31// defined at the top level in the same source file. Returns false if
32// messages were created, true if all is well.
33bool CheckArguments(const evaluate::characteristics::Procedure &,
34 evaluate::ActualArguments &, SemanticsContext &, const Scope &,
35 bool treatingExternalAsImplicit, bool ignoreImplicitVsExplicit,
36 const evaluate::SpecificIntrinsic *intrinsic);
37
38bool CheckPPCIntrinsic(const Symbol &generic, const Symbol &specific,
39 const evaluate::ActualArguments &actuals,
40 evaluate::FoldingContext &context);
41bool CheckWindowsIntrinsic(
42 const Symbol &intrinsic, evaluate::FoldingContext &context);
43bool CheckArgumentIsConstantExprInRange(
44 const evaluate::ActualArguments &actuals, int index, int lowerBound,
45 int upperBound, parser::ContextualMessages &messages);
46
47parser::Messages CheckExplicitInterface(
48 const evaluate::characteristics::Procedure &, evaluate::ActualArguments &,
49 SemanticsContext &, const Scope *, const evaluate::SpecificIntrinsic *,
50 bool allowActualArgumentConversions, bool extentErrors,
51 bool ignoreImplicitVsExplicit);
52
53// Checks actual arguments for the purpose of resolving a generic interface.
54bool CheckInterfaceForGeneric(const evaluate::characteristics::Procedure &,
55 evaluate::ActualArguments &, SemanticsContext &,
56 bool allowActualArgumentConversions = false);
57} // namespace Fortran::semantics
58#endif
Definition common.h:216
Definition scope.h:58
Definition semantics.h:67
Definition symbol.h:791
Definition call.h:34
Definition characteristics.h:367