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
16 namespace Fortran::parser {
17 class Messages;
18 class ContextualMessages;
19 } // namespace Fortran::parser
20 namespace Fortran::evaluate::characteristics {
21 struct Procedure;
22 }
23 namespace Fortran::evaluate {
24 class FoldingContext;
25 }
26
27 namespace Fortran::semantics {
28 class Scope;
29
30 // The Boolean flag argument should be true when the called procedure
31 // does not actually have an explicit interface at the call site, but
32 // its characteristics are known because it is a subroutine or function
33 // defined at the top level in the same source file.
34 void CheckArguments(const evaluate::characteristics::Procedure &,
35 evaluate::ActualArguments &, evaluate::FoldingContext &, const Scope &,
36 bool treatingExternalAsImplicit = false);
37
38 // Checks actual arguments against a procedure with an explicit interface.
39 // Reports a buffer of errors when not compatible.
40 parser::Messages CheckExplicitInterface(
41 const evaluate::characteristics::Procedure &, evaluate::ActualArguments &,
42 const evaluate::FoldingContext &, const Scope &);
43
44 // Checks actual arguments for the purpose of resolving a generic interface.
45 bool CheckInterfaceForGeneric(const evaluate::characteristics::Procedure &,
46 evaluate::ActualArguments &, const evaluate::FoldingContext &);
47 } // namespace Fortran::semantics
48 #endif
Fortran::parser
Definition: check-expression.h:19