brintos

brintos / llvm-project-archived public Read only

0
0
Text · 2.3 KiB · a69b792 Raw
59 lines · c
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-exception6//7//===----------------------------------------------------------------------===//8 9// Constraint checking for procedure references10 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;26class SemanticsContext;27 28// Argument treatingExternalAsImplicit should be true when the called procedure29// does not actually have an explicit interface at the call site, but30// its characteristics are known because it is a subroutine or function31// defined at the top level in the same source file.  Returns false if32// 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::semantics58#endif59