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
;
20 struct CoarrayAssociation
;
21 struct EndChangeTeamStmt
;
26 struct NotifyWaitStmt
;
28 struct SyncImagesStmt
;
29 struct SyncMemoryStmt
;
32 } // namespace Fortran::parser
34 namespace Fortran::semantics
{
36 class CoarrayChecker
: public virtual BaseChecker
{
38 CoarrayChecker(SemanticsContext
&context
) : context_
{context
} {}
39 void Leave(const parser::ChangeTeamStmt
&);
40 void Leave(const parser::EndChangeTeamStmt
&);
41 void Leave(const parser::SyncAllStmt
&);
42 void Leave(const parser::SyncImagesStmt
&);
43 void Leave(const parser::SyncMemoryStmt
&);
44 void Leave(const parser::SyncTeamStmt
&);
45 void Leave(const parser::NotifyWaitStmt
&);
46 void Leave(const parser::EventPostStmt
&);
47 void Leave(const parser::EventWaitStmt
&);
48 void Leave(const parser::UnlockStmt
&);
49 void Leave(const parser::CriticalStmt
&);
50 void Leave(const parser::ImageSelector
&);
51 void Leave(const parser::FormTeamStmt
&);
53 void Enter(const parser::CriticalConstruct
&);
56 SemanticsContext
&context_
;
61 void CheckNamesAreDistinct(const std::list
<parser::CoarrayAssociation
> &);
62 void Say2(const parser::CharBlock
&, parser::MessageFixedText
&&,
63 const parser::CharBlock
&, parser::MessageFixedText
&&);
65 } // namespace Fortran::semantics
66 #endif // FORTRAN_SEMANTICS_CHECK_COARRAY_H_