[lldb] Add ability to hide the root name of a value
[llvm-project.git] / flang / lib / Semantics / check-coarray.h
blobb4ce5b42ad6fefe21b152663582ee6a13fcc6915
1 //===-- lib/Semantics/check-coarray.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 //===----------------------------------------------------------------------===//
9 #ifndef FORTRAN_SEMANTICS_CHECK_COARRAY_H_
10 #define FORTRAN_SEMANTICS_CHECK_COARRAY_H_
12 #include "flang/Semantics/semantics.h"
13 #include <list>
15 namespace Fortran::parser {
16 class CharBlock;
17 class MessageFixedText;
18 struct ChangeTeamStmt;
19 struct CoarrayAssociation;
20 struct FormTeamStmt;
21 struct ImageSelector;
22 struct SyncAllStmt;
23 struct SyncImagesStmt;
24 struct SyncMemoryStmt;
25 struct SyncTeamStmt;
26 } // namespace Fortran::parser
28 namespace Fortran::semantics {
30 class CoarrayChecker : public virtual BaseChecker {
31 public:
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 &);
43 private:
44 SemanticsContext &context_;
45 bool haveStat_;
46 bool haveTeam_;
47 bool haveTeamNumber_;
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_