clang 22.0.0git
clang::OMPVarListClause< T > Class Template Reference

This represents clauses with the list of variables like 'private', 'firstprivate', 'copyin', 'shared', or 'reduction' clauses in the '#pragma omp ...' directives. More...

#include "clang/AST/OpenMPClause.h"

Inheritance diagram for clang::OMPVarListClause< T >:
[legend]

Public Types

using varlist_iterator = MutableArrayRef<Expr *>::iterator
using varlist_const_iterator = ArrayRef<const Expr *>::iterator
using varlist_range = llvm::iterator_range<varlist_iterator>
using varlist_const_range = llvm::iterator_range<varlist_const_iterator>
Public Types inherited from clang::OMPClause
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

unsigned varlist_size () const
bool varlist_empty () const
varlist_range varlist ()
varlist_const_range varlist () const
varlist_iterator varlist_begin ()
varlist_iterator varlist_end ()
varlist_const_iterator varlist_begin () const
varlist_const_iterator varlist_end () const
void setLParenLoc (SourceLocation Loc)
 Sets the location of '('.
SourceLocation getLParenLoc () const
 Returns the location of '('.
ArrayRef< const Expr * > getVarRefs () const
 Fetches list of all variables in the clause.
Public Member Functions inherited from clang::OMPClause
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

Protected Member Functions

 OMPVarListClause (OpenMPClauseKind K, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc, unsigned N)
 Build a clause with N variables.
MutableArrayRef< Expr * > getVarRefs ()
 Fetches list of variables associated with this clause.
void setVarRefs (ArrayRef< Expr * > VL)
 Sets the list of variables for this clause.
Protected Member Functions inherited from clang::OMPClause
 OMPClause (OpenMPClauseKind K, SourceLocation StartLoc, SourceLocation EndLoc)

Friends

class OMPClauseReader

Additional Inherited Members

Static Public Member Functions inherited from clang::OMPClause
static bool classof (const OMPClause *)

Detailed Description

template<class T>
class clang::OMPVarListClause< T >

This represents clauses with the list of variables like 'private', 'firstprivate', 'copyin', 'shared', or 'reduction' clauses in the '#pragma omp ...' directives.

Definition at line 275 of file OpenMPClause.h.

Member Typedef Documentation

◆ varlist_const_iterator

template<class T>
using clang::OMPVarListClause< T >::varlist_const_iterator = ArrayRef<const Expr *>::iterator

Definition at line 311 of file OpenMPClause.h.

◆ varlist_const_range

template<class T>
using clang::OMPVarListClause< T >::varlist_const_range = llvm::iterator_range<varlist_const_iterator>

Definition at line 313 of file OpenMPClause.h.

◆ varlist_iterator

template<class T>
using clang::OMPVarListClause< T >::varlist_iterator = MutableArrayRef<Expr *>::iterator

Definition at line 310 of file OpenMPClause.h.

◆ varlist_range

template<class T>
using clang::OMPVarListClause< T >::varlist_range = llvm::iterator_range<varlist_iterator>

Definition at line 312 of file OpenMPClause.h.

Constructor & Destructor Documentation

◆ OMPVarListClause()

template<class T>
clang::OMPVarListClause< T >::OMPVarListClause ( OpenMPClauseKind K,
SourceLocation StartLoc,
SourceLocation LParenLoc,
SourceLocation EndLoc,
unsigned N )
inlineprotected

Build a clause with N variables.

Parameters
KKind of the clause.
StartLocStarting location of the clause (the clause keyword).
LParenLocLocation of '('.
EndLocEnding location of the clause.
NNumber of the variables in the clause.

Definition at line 292 of file OpenMPClause.h.

References clang::OMPClause::OMPClause().

Referenced by clang::OMPMappableExprListClause< T >::OMPMappableExprListClause().

Member Function Documentation

◆ getLParenLoc()

template<class T>
SourceLocation clang::OMPVarListClause< T >::getLParenLoc ( ) const
inline

Returns the location of '('.

Definition at line 334 of file OpenMPClause.h.

Referenced by clang::SemaOpenMP::ActOnOpenMPFlushDirective().

◆ getVarRefs() [1/2]

template<class T>
MutableArrayRef< Expr * > clang::OMPVarListClause< T >::getVarRefs ( )
inlineprotected

Fetches list of variables associated with this clause.

Definition at line 297 of file OpenMPClause.h.

References clang::T.

Referenced by setVarRefs(), varlist_begin(), varlist_begin(), varlist_end(), and varlist_end().

◆ getVarRefs() [2/2]

template<class T>
ArrayRef< const Expr * > clang::OMPVarListClause< T >::getVarRefs ( ) const
inline

Fetches list of all variables in the clause.

Definition at line 337 of file OpenMPClause.h.

References clang::T.

◆ setLParenLoc()

template<class T>
void clang::OMPVarListClause< T >::setLParenLoc ( SourceLocation Loc)
inline

Sets the location of '('.

Definition at line 331 of file OpenMPClause.h.

◆ setVarRefs()

template<class T>
void clang::OMPVarListClause< T >::setVarRefs ( ArrayRef< Expr * > VL)
inlineprotected

Sets the list of variables for this clause.

Definition at line 303 of file OpenMPClause.h.

References getVarRefs().

◆ varlist() [1/2]

template<class T>
varlist_range clang::OMPVarListClause< T >::varlist ( )
inline

Definition at line 318 of file OpenMPClause.h.

References varlist_begin(), and varlist_end().

◆ varlist() [2/2]

template<class T>
varlist_const_range clang::OMPVarListClause< T >::varlist ( ) const
inline

Definition at line 321 of file OpenMPClause.h.

References varlist_begin(), and varlist_end().

◆ varlist_begin() [1/2]

template<class T>
varlist_iterator clang::OMPVarListClause< T >::varlist_begin ( )
inline

Definition at line 325 of file OpenMPClause.h.

References getVarRefs().

Referenced by varlist(), and varlist().

◆ varlist_begin() [2/2]

template<class T>
varlist_const_iterator clang::OMPVarListClause< T >::varlist_begin ( ) const
inline

Definition at line 327 of file OpenMPClause.h.

References getVarRefs().

◆ varlist_empty()

template<class T>
bool clang::OMPVarListClause< T >::varlist_empty ( ) const
inline

Definition at line 316 of file OpenMPClause.h.

◆ varlist_end() [1/2]

template<class T>
varlist_iterator clang::OMPVarListClause< T >::varlist_end ( )
inline

Definition at line 326 of file OpenMPClause.h.

References getVarRefs().

Referenced by varlist(), and varlist().

◆ varlist_end() [2/2]

template<class T>
varlist_const_iterator clang::OMPVarListClause< T >::varlist_end ( ) const
inline

Definition at line 328 of file OpenMPClause.h.

References getVarRefs().

◆ varlist_size()

◆ OMPClauseReader

template<class T>
friend class OMPClauseReader
friend

Definition at line 276 of file OpenMPClause.h.

References OMPClauseReader.

Referenced by OMPClauseReader.


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