1 //===-- lib/Semantics/check-coarray.h ---------------------------*- C++ -*-===//
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
7 //===----------------------------------------------------------------------===//
9 #ifndef FORTRAN_SEMANTICS_CHECK_COARRAY_H_
10 #define FORTRAN_SEMANTICS_CHECK_COARRAY_H_
12 #include "flang/Semantics/semantics.h"
15 namespace Fortran::parser
{
17 class MessageFixedText
;
18 struct ChangeTeamStmt
;
19 struct CoarrayAssociation
;
23 struct SyncImagesStmt
;
24 struct SyncMemoryStmt
;
26 } // namespace Fortran::parser
28 namespace Fortran::semantics
{
30 class CoarrayChecker
: public virtual BaseChecker
{
32 CoarrayChecker(SemanticsContext
&context
) : context_
{context
} {}
33 void Leave(const parser::ChangeTeamStmt
&);
34 void Leave(const parser::SyncAllStmt
&);
35 void Leave(const parser::SyncImagesStmt
&);
36 void Leave(const parser::SyncMemoryStmt
&);
37 void Leave(const parser::SyncTeamStmt
&);
38 void Leave(const parser::ImageSelector
&);
39 void Leave(const parser::FormTeamStmt
&);
41 void Enter(const parser::CriticalConstruct
&);
44 SemanticsContext
&context_
;
49 void CheckNamesAreDistinct(const std::list
<parser::CoarrayAssociation
> &);
50 void Say2(const parser::CharBlock
&, parser::MessageFixedText
&&,
51 const parser::CharBlock
&, parser::MessageFixedText
&&);
53 } // namespace Fortran::semantics
54 #endif // FORTRAN_SEMANTICS_CHECK_COARRAY_H_