clang 19.0.0git
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | List of all members
clang::OMPClause Class Reference

This is a basic class for representing single OpenMP clause. More...

#include "clang/AST/OpenMPClause.h"

Inherited by clang::OMPNoChildClause< llvm::omp::OMPC_bind >, clang::OMPNoChildClause< llvm::omp::OMPC_full >, clang::OMPNoChildClause< llvm::omp::OMPC_nowait >, clang::OMPNoChildClause< llvm::omp::OMPC_threads >, clang::OMPNoChildClause< llvm::omp::OMPC_unified_address >, clang::OMPNoChildClause< llvm::omp::OMPC_ompx_attribute >, clang::OMPNoChildClause< llvm::omp::OMPC_ompx_bare >, clang::OMPOneStmtClause< llvm::omp::OMPC_align, OMPClause >, clang::OMPOneStmtClause< llvm::omp::OMPC_allocator, OMPClause >, clang::OMPOneStmtClause< llvm::omp::OMPC_collapse, OMPClause >, clang::OMPOneStmtClause< llvm::omp::OMPC_detach, OMPClause >, clang::OMPOneStmtClause< llvm::omp::OMPC_filter, OMPClause >, clang::OMPOneStmtClause< llvm::omp::OMPC_final, OMPClause >, clang::OMPOneStmtClause< llvm::omp::OMPC_nocontext, OMPClause >, clang::OMPOneStmtClause< llvm::omp::OMPC_novariants, OMPClause >, clang::OMPOneStmtClause< llvm::omp::OMPC_num_threads, OMPClause >, clang::OMPOneStmtClause< llvm::omp::OMPC_safelen, OMPClause >, clang::OMPOneStmtClause< llvm::omp::OMPC_simdlen, OMPClause >, clang::OMPOneStmtClause< llvm::omp::OMPC_ompx_dyn_cgroup_mem, OMPClause >, clang::OMPVarListClause< OMPAffinityClause >, clang::OMPVarListClause< OMPAlignedClause >, clang::OMPVarListClause< OMPAllocateClause >, clang::OMPVarListClause< OMPCopyinClause >, clang::OMPVarListClause< OMPCopyprivateClause >, clang::OMPVarListClause< OMPDependClause >, clang::OMPVarListClause< OMPDoacrossClause >, clang::OMPVarListClause< OMPExclusiveClause >, clang::OMPVarListClause< OMPFirstprivateClause >, clang::OMPVarListClause< OMPFlushClause >, clang::OMPVarListClause< OMPFromClause >, clang::OMPVarListClause< OMPHasDeviceAddrClause >, clang::OMPVarListClause< OMPInReductionClause >, clang::OMPVarListClause< OMPInclusiveClause >, clang::OMPVarListClause< OMPInitClause >, clang::OMPVarListClause< OMPIsDevicePtrClause >, clang::OMPVarListClause< OMPLastprivateClause >, clang::OMPVarListClause< OMPLinearClause >, clang::OMPVarListClause< OMPMapClause >, clang::OMPVarListClause< OMPNontemporalClause >, clang::OMPVarListClause< OMPPrivateClause >, clang::OMPVarListClause< OMPReductionClause >, clang::OMPVarListClause< OMPSharedClause >, clang::OMPVarListClause< OMPTaskReductionClause >, clang::OMPVarListClause< OMPToClause >, clang::OMPVarListClause< OMPUseDeviceAddrClause >, clang::OMPVarListClause< OMPUseDevicePtrClause >, clang::OMPAcqRelClause, clang::OMPAcquireClause, clang::OMPAtClause, clang::OMPAtomicDefaultMemOrderClause, clang::OMPCaptureClause, clang::OMPCompareClause, clang::OMPDefaultClause, clang::OMPDefaultmapClause, clang::OMPDepobjClause, clang::OMPDestroyClause, clang::OMPDeviceClause, clang::OMPDistScheduleClause, clang::OMPDynamicAllocatorsClause, clang::OMPFailClause, clang::OMPGrainsizeClause, clang::OMPHintClause, clang::OMPIfClause, clang::OMPMergeableClause, clang::OMPMessageClause, clang::OMPNoChildClause< ClauseKind >, clang::OMPNogroupClause, clang::OMPNumTasksClause, clang::OMPNumTeamsClause, clang::OMPOrderClause, clang::OMPOrderedClause, clang::OMPPartialClause, clang::OMPPriorityClause, clang::OMPProcBindClause, clang::OMPReadClause, clang::OMPRelaxedClause, clang::OMPReleaseClause, clang::OMPReverseOffloadClause, clang::OMPSIMDClause, clang::OMPScheduleClause, clang::OMPSeqCstClause, clang::OMPSeverityClause, clang::OMPSizesClause, clang::OMPThreadLimitClause, clang::OMPUnifiedSharedMemoryClause, clang::OMPUntiedClause, clang::OMPUpdateClause, clang::OMPUseClause, clang::OMPUsesAllocatorsClause, clang::OMPVarListClause< T >, clang::OMPWeakClause, and clang::OMPWriteClause.

Public Types

using child_iterator = StmtIterator
 
using const_child_iterator = ConstStmtIterator
 
using child_range = llvm::iterator_range< child_iterator >
 
using const_child_range = llvm::iterator_range< const_child_iterator >
 

Public Member Functions

SourceLocation getBeginLoc () const
 Returns the starting location of the clause.
 
SourceLocation getEndLoc () const
 Returns the ending location of the clause.
 
void setLocStart (SourceLocation Loc)
 Sets the starting location of the clause.
 
void setLocEnd (SourceLocation Loc)
 Sets the ending location of the clause.
 
OpenMPClauseKind getClauseKind () const
 Returns kind of OpenMP clause (private, shared, reduction, etc.).
 
bool isImplicit () const
 
child_range children ()
 
const_child_range children () const
 
child_range used_children ()
 Get the iterator range for the expressions used in the clauses.
 
const_child_range used_children () const
 

Static Public Member Functions

static bool classof (const OMPClause *)
 

Protected Member Functions

 OMPClause (OpenMPClauseKind K, SourceLocation StartLoc, SourceLocation EndLoc)
 

Detailed Description

This is a basic class for representing single OpenMP clause.

Definition at line 55 of file OpenMPClause.h.

Member Typedef Documentation

◆ child_iterator

Definition at line 87 of file OpenMPClause.h.

◆ child_range

using clang::OMPClause::child_range = llvm::iterator_range<child_iterator>

Definition at line 89 of file OpenMPClause.h.

◆ const_child_iterator

Definition at line 88 of file OpenMPClause.h.

◆ const_child_range

Definition at line 90 of file OpenMPClause.h.

Constructor & Destructor Documentation

◆ OMPClause()

clang::OMPClause::OMPClause ( OpenMPClauseKind  K,
SourceLocation  StartLoc,
SourceLocation  EndLoc 
)
inlineprotected

Definition at line 66 of file OpenMPClause.h.

Member Function Documentation

◆ children() [1/2]

OMPClause::child_range OMPClause::children ( )

Definition at line 32 of file OpenMPClause.cpp.

References getClauseKind().

Referenced by children(), and used_children().

◆ children() [2/2]

const_child_range clang::OMPClause::children ( ) const
inline

Definition at line 93 of file OpenMPClause.h.

References children().

◆ classof()

static bool clang::OMPClause::classof ( const OMPClause )
inlinestatic

Definition at line 107 of file OpenMPClause.h.

◆ getBeginLoc()

SourceLocation clang::OMPClause::getBeginLoc ( ) const
inline

◆ getClauseKind()

OpenMPClauseKind clang::OMPClause::getClauseKind ( ) const
inline

Returns kind of OpenMP clause (private, shared, reduction, etc.).

Definition at line 83 of file OpenMPClause.h.

Referenced by clang::Sema::ActOnOpenMPFlushDirective(), clang::Sema::ActOnOpenMPOrderedDirective(), clang::Sema::ActOnOpenMPRegionEnd(), clang::Sema::ActOnOpenMPSingleDirective(), checkMutuallyExclusiveClauses(), checkOrderedOrderSpecified(), checkSimdlenSafelenSpecified(), children(), clang::OMPNoChildClause< ClauseKind >::classof(), clang::OMPOneStmtClause< ClauseKind, Base >::classof(), clang::OMPAllocateClause::classof(), clang::OMPIfClause::classof(), clang::OMPSizesClause::classof(), clang::OMPPartialClause::classof(), clang::OMPDefaultClause::classof(), clang::OMPProcBindClause::classof(), clang::OMPUnifiedSharedMemoryClause::classof(), clang::OMPReverseOffloadClause::classof(), clang::OMPDynamicAllocatorsClause::classof(), clang::OMPAtomicDefaultMemOrderClause::classof(), clang::OMPAtClause::classof(), clang::OMPSeverityClause::classof(), clang::OMPMessageClause::classof(), clang::OMPScheduleClause::classof(), clang::OMPOrderedClause::classof(), clang::OMPUntiedClause::classof(), clang::OMPMergeableClause::classof(), clang::OMPReadClause::classof(), clang::OMPWriteClause::classof(), clang::OMPUpdateClause::classof(), clang::OMPCaptureClause::classof(), clang::OMPCompareClause::classof(), clang::OMPSeqCstClause::classof(), clang::OMPAcqRelClause::classof(), clang::OMPAcquireClause::classof(), clang::OMPReleaseClause::classof(), clang::OMPRelaxedClause::classof(), clang::OMPWeakClause::classof(), clang::OMPFailClause::classof(), clang::OMPPrivateClause::classof(), clang::OMPFirstprivateClause::classof(), clang::OMPLastprivateClause::classof(), clang::OMPSharedClause::classof(), clang::OMPReductionClause::classof(), clang::OMPTaskReductionClause::classof(), clang::OMPInReductionClause::classof(), clang::OMPLinearClause::classof(), clang::OMPAlignedClause::classof(), clang::OMPCopyinClause::classof(), clang::OMPCopyprivateClause::classof(), clang::OMPFlushClause::classof(), clang::OMPDepobjClause::classof(), clang::OMPDependClause::classof(), clang::OMPDeviceClause::classof(), clang::OMPSIMDClause::classof(), clang::OMPMapClause::classof(), clang::OMPNumTeamsClause::classof(), clang::OMPThreadLimitClause::classof(), clang::OMPPriorityClause::classof(), clang::OMPGrainsizeClause::classof(), clang::OMPNogroupClause::classof(), clang::OMPNumTasksClause::classof(), clang::OMPHintClause::classof(), clang::OMPDistScheduleClause::classof(), clang::OMPDefaultmapClause::classof(), clang::OMPToClause::classof(), clang::OMPFromClause::classof(), clang::OMPUseDevicePtrClause::classof(), clang::OMPUseDeviceAddrClause::classof(), clang::OMPIsDevicePtrClause::classof(), clang::OMPHasDeviceAddrClause::classof(), clang::OMPNontemporalClause::classof(), clang::OMPOrderClause::classof(), clang::OMPInitClause::classof(), clang::OMPUseClause::classof(), clang::OMPDestroyClause::classof(), clang::OMPInclusiveClause::classof(), clang::OMPExclusiveClause::classof(), clang::OMPUsesAllocatorsClause::classof(), clang::OMPAffinityClause::classof(), clang::OMPDoacrossClause::classof(), and used_children().

◆ getEndLoc()

SourceLocation clang::OMPClause::getEndLoc ( ) const
inline

Returns the ending location of the clause.

Definition at line 74 of file OpenMPClause.h.

Referenced by clang::Sema::ActOnOpenMPRegionEnd(), checkOrderedOrderSpecified(), and checkReductionClauseWithNogroup().

◆ isImplicit()

bool clang::OMPClause::isImplicit ( ) const
inline

Definition at line 85 of file OpenMPClause.h.

References clang::SourceLocation::isInvalid().

◆ setLocEnd()

void clang::OMPClause::setLocEnd ( SourceLocation  Loc)
inline

Sets the ending location of the clause.

Definition at line 80 of file OpenMPClause.h.

Referenced by clang::OMPFullClause::Create(), clang::OMPSizesClause::Create(), and clang::OMPPartialClause::Create().

◆ setLocStart()

void clang::OMPClause::setLocStart ( SourceLocation  Loc)
inline

Sets the starting location of the clause.

Definition at line 77 of file OpenMPClause.h.

Referenced by clang::OMPFullClause::Create(), clang::OMPSizesClause::Create(), and clang::OMPPartialClause::Create().

◆ used_children() [1/2]

OMPClause::child_range OMPClause::used_children ( )

Get the iterator range for the expressions used in the clauses.

Used expressions include only the children that must be evaluated at the runtime before entering the construct.

Definition at line 45 of file OpenMPClause.cpp.

References getClauseKind().

◆ used_children() [2/2]

const_child_range clang::OMPClause::used_children ( ) const
inline

Definition at line 102 of file OpenMPClause.h.

References children().


The documentation for this class was generated from the following files: