clang  14.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::OMPAcqRelClause, clang::OMPAcquireClause, clang::OMPAllocatorClause, clang::OMPAtomicDefaultMemOrderClause, clang::OMPCaptureClause, clang::OMPCollapseClause, clang::OMPDefaultClause, clang::OMPDefaultmapClause, clang::OMPDepobjClause, clang::OMPDestroyClause, clang::OMPDetachClause, clang::OMPDeviceClause, clang::OMPDistScheduleClause, clang::OMPDynamicAllocatorsClause, clang::OMPFilterClause, clang::OMPFinalClause, clang::OMPFullClause, clang::OMPGrainsizeClause, clang::OMPHintClause, clang::OMPIfClause, clang::OMPMergeableClause, clang::OMPNocontextClause, clang::OMPNogroupClause, clang::OMPNovariantsClause, clang::OMPNowaitClause, clang::OMPNumTasksClause, clang::OMPNumTeamsClause, clang::OMPNumThreadsClause, clang::OMPOrderClause, clang::OMPOrderedClause, clang::OMPPartialClause, clang::OMPPriorityClause, clang::OMPProcBindClause, clang::OMPReadClause, clang::OMPRelaxedClause, clang::OMPReleaseClause, clang::OMPReverseOffloadClause, clang::OMPSafelenClause, clang::OMPScheduleClause, clang::OMPSeqCstClause, clang::OMPSIMDClause, clang::OMPSimdlenClause, clang::OMPSizesClause, clang::OMPThreadLimitClause, clang::OMPThreadsClause, clang::OMPUnifiedAddressClause, clang::OMPUnifiedSharedMemoryClause, clang::OMPUntiedClause, clang::OMPUpdateClause, clang::OMPUseClause, clang::OMPUsesAllocatorsClause, clang::OMPVarListClause< T >, clang::OMPWriteClause, clang::OMPVarListClause< OMPAffinityClause >, clang::OMPVarListClause< OMPAlignedClause >, clang::OMPVarListClause< OMPAllocateClause >, clang::OMPVarListClause< OMPCopyinClause >, clang::OMPVarListClause< OMPCopyprivateClause >, clang::OMPVarListClause< OMPDependClause >, clang::OMPVarListClause< OMPExclusiveClause >, clang::OMPVarListClause< OMPFirstprivateClause >, clang::OMPVarListClause< OMPFlushClause >, clang::OMPVarListClause< OMPFromClause >, clang::OMPVarListClause< OMPInclusiveClause >, clang::OMPVarListClause< OMPInitClause >, clang::OMPVarListClause< OMPInReductionClause >, 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 >, and clang::OMPVarListClause< OMPUseDevicePtrClause >.

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. More...
 
SourceLocation getEndLoc () const
 Returns the ending location of the clause. More...
 
void setLocStart (SourceLocation Loc)
 Sets the starting location of the clause. More...
 
void setLocEnd (SourceLocation Loc)
 Sets the ending location of the clause. More...
 
OpenMPClauseKind getClauseKind () const
 Returns kind of OpenMP clause (private, shared, reduction, etc.). More...
 
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. More...
 
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 54 of file OpenMPClause.h.

Member Typedef Documentation

◆ child_iterator

Definition at line 86 of file OpenMPClause.h.

◆ child_range

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

Definition at line 88 of file OpenMPClause.h.

◆ const_child_iterator

Definition at line 87 of file OpenMPClause.h.

◆ const_child_range

Definition at line 89 of file OpenMPClause.h.

Constructor & Destructor Documentation

◆ OMPClause()

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

Definition at line 65 of file OpenMPClause.h.

Member Function Documentation

◆ children() [1/2]

OMPClause::child_range OMPClause::children ( )

Definition at line 31 of file OpenMPClause.cpp.

Referenced by children(), and used_children().

◆ children() [2/2]

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

Definition at line 92 of file OpenMPClause.h.

References children().

◆ classof()

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

Definition at line 106 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 82 of file OpenMPClause.h.

Referenced by clang::Sema::ActOnOpenMPFlushDirective(), clang::Sema::ActOnOpenMPOrderedDirective(), clang::Sema::ActOnOpenMPSingleDirective(), clang::OMPAllocatorClause::classof(), clang::OMPAllocateClause::classof(), clang::OMPIfClause::classof(), clang::OMPFinalClause::classof(), clang::OMPNumThreadsClause::classof(), clang::OMPSafelenClause::classof(), clang::OMPSimdlenClause::classof(), clang::OMPSizesClause::classof(), clang::OMPFullClause::classof(), clang::OMPPartialClause::classof(), clang::OMPCollapseClause::classof(), clang::OMPDefaultClause::classof(), clang::OMPProcBindClause::classof(), clang::OMPUnifiedAddressClause::classof(), clang::OMPUnifiedSharedMemoryClause::classof(), clang::OMPReverseOffloadClause::classof(), clang::OMPDynamicAllocatorsClause::classof(), clang::OMPAtomicDefaultMemOrderClause::classof(), clang::OMPScheduleClause::classof(), clang::OMPOrderedClause::classof(), clang::OMPNowaitClause::classof(), clang::OMPUntiedClause::classof(), clang::OMPMergeableClause::classof(), clang::OMPReadClause::classof(), clang::OMPWriteClause::classof(), clang::OMPUpdateClause::classof(), clang::OMPCaptureClause::classof(), clang::OMPSeqCstClause::classof(), clang::OMPAcqRelClause::classof(), clang::OMPAcquireClause::classof(), clang::OMPReleaseClause::classof(), clang::OMPRelaxedClause::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::OMPThreadsClause::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::OMPNontemporalClause::classof(), clang::OMPOrderClause::classof(), clang::OMPInitClause::classof(), clang::OMPUseClause::classof(), clang::OMPDestroyClause::classof(), clang::OMPNovariantsClause::classof(), clang::OMPNocontextClause::classof(), clang::OMPDetachClause::classof(), clang::OMPInclusiveClause::classof(), clang::OMPExclusiveClause::classof(), clang::OMPUsesAllocatorsClause::classof(), clang::OMPAffinityClause::classof(), and clang::OMPFilterClause::classof().

◆ getEndLoc()

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

Returns the ending location of the clause.

Definition at line 73 of file OpenMPClause.h.

◆ isImplicit()

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

Definition at line 84 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 79 of file OpenMPClause.h.

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

◆ setLocStart()

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

Sets the starting location of the clause.

Definition at line 76 of file OpenMPClause.h.

Referenced by clang::OMPSizesClause::Create(), clang::OMPFullClause::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 44 of file OpenMPClause.cpp.

◆ used_children() [2/2]

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

Definition at line 101 of file OpenMPClause.h.

References children().


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