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