Loading clang/include/clang/AST/OpenMPClause.h +40 −0 Original line number Diff line number Diff line Loading @@ -1955,6 +1955,46 @@ public: } }; /// This represents 'release' clause in the '#pragma omp atomic|flush' /// directives. /// /// \code /// #pragma omp flush release /// \endcode /// In this example directive '#pragma omp flush' has 'release' clause. class OMPReleaseClause final : public OMPClause { public: /// Build 'release' clause. /// /// \param StartLoc Starting location of the clause. /// \param EndLoc Ending location of the clause. OMPReleaseClause(SourceLocation StartLoc, SourceLocation EndLoc) : OMPClause(OMPC_release, StartLoc, EndLoc) {} /// Build an empty clause. OMPReleaseClause() : OMPClause(OMPC_release, SourceLocation(), SourceLocation()) {} child_range children() { return child_range(child_iterator(), child_iterator()); } const_child_range children() const { return const_child_range(const_child_iterator(), const_child_iterator()); } child_range used_children() { return child_range(child_iterator(), child_iterator()); } const_child_range used_children() const { return const_child_range(const_child_iterator(), const_child_iterator()); } static bool classof(const OMPClause *T) { return T->getClauseKind() == OMPC_release; } }; /// This represents clause 'private' in the '#pragma omp ...' directives. /// /// \code Loading clang/include/clang/AST/RecursiveASTVisitor.h +5 −0 Original line number Diff line number Diff line Loading @@ -3131,6 +3131,11 @@ bool RecursiveASTVisitor<Derived>::VisitOMPAcquireClause(OMPAcquireClause *) { return true; } template <typename Derived> bool RecursiveASTVisitor<Derived>::VisitOMPReleaseClause(OMPReleaseClause *) { return true; } template <typename Derived> bool RecursiveASTVisitor<Derived>::VisitOMPThreadsClause(OMPThreadsClause *) { return true; Loading clang/include/clang/Basic/DiagnosticSemaKinds.td +1 −1 Original line number Diff line number Diff line Loading @@ -9696,7 +9696,7 @@ def note_omp_atomic_capture: Note< def err_omp_atomic_several_clauses : Error< "directive '#pragma omp atomic' cannot contain more than one 'read', 'write', 'update' or 'capture' clause">; def err_omp_several_mem_order_clauses : Error< "directive '#pragma omp %0' cannot contain more than one %select{'seq_cst', |}1'acq_rel' or 'acquire' clause">; "directive '#pragma omp %0' cannot contain more than one %select{'seq_cst', |}1'acq_rel', 'acquire' or 'release' clause">; def note_omp_previous_mem_order_clause : Note< "'%0' clause used here">; def err_omp_target_contains_not_only_teams : Error< Loading clang/include/clang/Basic/OpenMPKinds.def +3 −0 Original line number Diff line number Diff line Loading @@ -259,6 +259,7 @@ OPENMP_CLAUSE(capture, OMPCaptureClause) OPENMP_CLAUSE(seq_cst, OMPSeqCstClause) OPENMP_CLAUSE(acq_rel, OMPAcqRelClause) OPENMP_CLAUSE(acquire, OMPAcquireClause) OPENMP_CLAUSE(release, OMPReleaseClause) OPENMP_CLAUSE(depend, OMPDependClause) OPENMP_CLAUSE(device, OMPDeviceClause) OPENMP_CLAUSE(threads, OMPThreadsClause) Loading Loading @@ -493,6 +494,7 @@ OPENMP_ATOMIC_CLAUSE(capture) OPENMP_ATOMIC_CLAUSE(seq_cst) OPENMP_ATOMIC_CLAUSE(acq_rel) OPENMP_ATOMIC_CLAUSE(acquire) OPENMP_ATOMIC_CLAUSE(release) // Clauses allowed for OpenMP directive 'target'. OPENMP_TARGET_CLAUSE(if) Loading Loading @@ -1092,6 +1094,7 @@ OPENMP_ORDER_KIND(concurrent) // Clauses allowed for OpenMP directive 'flush'. OPENMP_FLUSH_CLAUSE(acq_rel) OPENMP_FLUSH_CLAUSE(acquire) OPENMP_FLUSH_CLAUSE(release) #undef OPENMP_FLUSH_CLAUSE #undef OPENMP_ORDER_KIND Loading clang/include/clang/Sema/Sema.h +3 −0 Original line number Diff line number Diff line Loading @@ -10334,6 +10334,9 @@ public: /// Called on well-formed 'acquire' clause. OMPClause *ActOnOpenMPAcquireClause(SourceLocation StartLoc, SourceLocation EndLoc); /// Called on well-formed 'release' clause. OMPClause *ActOnOpenMPReleaseClause(SourceLocation StartLoc, SourceLocation EndLoc); /// Called on well-formed 'threads' clause. OMPClause *ActOnOpenMPThreadsClause(SourceLocation StartLoc, SourceLocation EndLoc); Loading Loading
clang/include/clang/AST/OpenMPClause.h +40 −0 Original line number Diff line number Diff line Loading @@ -1955,6 +1955,46 @@ public: } }; /// This represents 'release' clause in the '#pragma omp atomic|flush' /// directives. /// /// \code /// #pragma omp flush release /// \endcode /// In this example directive '#pragma omp flush' has 'release' clause. class OMPReleaseClause final : public OMPClause { public: /// Build 'release' clause. /// /// \param StartLoc Starting location of the clause. /// \param EndLoc Ending location of the clause. OMPReleaseClause(SourceLocation StartLoc, SourceLocation EndLoc) : OMPClause(OMPC_release, StartLoc, EndLoc) {} /// Build an empty clause. OMPReleaseClause() : OMPClause(OMPC_release, SourceLocation(), SourceLocation()) {} child_range children() { return child_range(child_iterator(), child_iterator()); } const_child_range children() const { return const_child_range(const_child_iterator(), const_child_iterator()); } child_range used_children() { return child_range(child_iterator(), child_iterator()); } const_child_range used_children() const { return const_child_range(const_child_iterator(), const_child_iterator()); } static bool classof(const OMPClause *T) { return T->getClauseKind() == OMPC_release; } }; /// This represents clause 'private' in the '#pragma omp ...' directives. /// /// \code Loading
clang/include/clang/AST/RecursiveASTVisitor.h +5 −0 Original line number Diff line number Diff line Loading @@ -3131,6 +3131,11 @@ bool RecursiveASTVisitor<Derived>::VisitOMPAcquireClause(OMPAcquireClause *) { return true; } template <typename Derived> bool RecursiveASTVisitor<Derived>::VisitOMPReleaseClause(OMPReleaseClause *) { return true; } template <typename Derived> bool RecursiveASTVisitor<Derived>::VisitOMPThreadsClause(OMPThreadsClause *) { return true; Loading
clang/include/clang/Basic/DiagnosticSemaKinds.td +1 −1 Original line number Diff line number Diff line Loading @@ -9696,7 +9696,7 @@ def note_omp_atomic_capture: Note< def err_omp_atomic_several_clauses : Error< "directive '#pragma omp atomic' cannot contain more than one 'read', 'write', 'update' or 'capture' clause">; def err_omp_several_mem_order_clauses : Error< "directive '#pragma omp %0' cannot contain more than one %select{'seq_cst', |}1'acq_rel' or 'acquire' clause">; "directive '#pragma omp %0' cannot contain more than one %select{'seq_cst', |}1'acq_rel', 'acquire' or 'release' clause">; def note_omp_previous_mem_order_clause : Note< "'%0' clause used here">; def err_omp_target_contains_not_only_teams : Error< Loading
clang/include/clang/Basic/OpenMPKinds.def +3 −0 Original line number Diff line number Diff line Loading @@ -259,6 +259,7 @@ OPENMP_CLAUSE(capture, OMPCaptureClause) OPENMP_CLAUSE(seq_cst, OMPSeqCstClause) OPENMP_CLAUSE(acq_rel, OMPAcqRelClause) OPENMP_CLAUSE(acquire, OMPAcquireClause) OPENMP_CLAUSE(release, OMPReleaseClause) OPENMP_CLAUSE(depend, OMPDependClause) OPENMP_CLAUSE(device, OMPDeviceClause) OPENMP_CLAUSE(threads, OMPThreadsClause) Loading Loading @@ -493,6 +494,7 @@ OPENMP_ATOMIC_CLAUSE(capture) OPENMP_ATOMIC_CLAUSE(seq_cst) OPENMP_ATOMIC_CLAUSE(acq_rel) OPENMP_ATOMIC_CLAUSE(acquire) OPENMP_ATOMIC_CLAUSE(release) // Clauses allowed for OpenMP directive 'target'. OPENMP_TARGET_CLAUSE(if) Loading Loading @@ -1092,6 +1094,7 @@ OPENMP_ORDER_KIND(concurrent) // Clauses allowed for OpenMP directive 'flush'. OPENMP_FLUSH_CLAUSE(acq_rel) OPENMP_FLUSH_CLAUSE(acquire) OPENMP_FLUSH_CLAUSE(release) #undef OPENMP_FLUSH_CLAUSE #undef OPENMP_ORDER_KIND Loading
clang/include/clang/Sema/Sema.h +3 −0 Original line number Diff line number Diff line Loading @@ -10334,6 +10334,9 @@ public: /// Called on well-formed 'acquire' clause. OMPClause *ActOnOpenMPAcquireClause(SourceLocation StartLoc, SourceLocation EndLoc); /// Called on well-formed 'release' clause. OMPClause *ActOnOpenMPReleaseClause(SourceLocation StartLoc, SourceLocation EndLoc); /// Called on well-formed 'threads' clause. OMPClause *ActOnOpenMPThreadsClause(SourceLocation StartLoc, SourceLocation EndLoc); Loading