clang 20.0.0git
Public Member Functions | Static Public Member Functions | Friends | List of all members
clang::OMPUpdateClause Class Referencefinal

This represents 'update' clause in the '#pragma omp atomic' directive. More...

#include "clang/AST/OpenMPClause.h"

Inheritance diagram for clang::OMPUpdateClause:
Inheritance graph
[legend]

Public Member Functions

bool isExtended () const
 Checks if the clause is the extended clauses for 'depobj' directive.
 
child_range children ()
 
const_child_range children () const
 
child_range used_children ()
 
const_child_range used_children () const
 
SourceLocation getLParenLoc () const
 Gets the location of '(' in clause for 'depobj' directive.
 
SourceLocation getArgumentLoc () const
 Gets the location of argument in clause for 'depobj' directive.
 
OpenMPDependClauseKind getDependencyKind () const
 Gets the dependence kind in clause for 'depobj' directive.
 
- 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
 

Static Public Member Functions

static OMPUpdateClauseCreate (const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc)
 Creates clause for 'atomic' directive.
 
static OMPUpdateClauseCreate (const ASTContext &C, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation ArgumentLoc, OpenMPDependClauseKind DK, SourceLocation EndLoc)
 Creates clause for 'depobj' directive.
 
static OMPUpdateClauseCreateEmpty (const ASTContext &C, bool IsExtended)
 Creates an empty clause with the place for N variables.
 
static bool classof (const OMPClause *T)
 
- Static Public Member Functions inherited from clang::OMPClause
static bool classof (const OMPClause *)
 

Friends

class OMPClauseReader
 

Additional Inherited Members

- 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 >
 
- Protected Member Functions inherited from clang::OMPClause
 OMPClause (OpenMPClauseKind K, SourceLocation StartLoc, SourceLocation EndLoc)
 

Detailed Description

This represents 'update' clause in the '#pragma omp atomic' directive.

#pragma omp atomic update

In this example directive '#pragma omp atomic' has 'update' clause. Also, this class represents 'update' clause in '#pragma omp depobj' directive.

#pragma omp depobj(a) update(in)

In this example directive '#pragma omp depobj' has 'update' clause with 'in' dependence kind.

Definition at line 2347 of file OpenMPClause.h.

Member Function Documentation

◆ children() [1/2]

child_range clang::OMPUpdateClause::children ( )
inline

Definition at line 2429 of file OpenMPClause.h.

◆ children() [2/2]

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

Definition at line 2433 of file OpenMPClause.h.

◆ classof()

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

Definition at line 2462 of file OpenMPClause.h.

References clang::T.

◆ Create() [1/2]

OMPUpdateClause * OMPUpdateClause::Create ( const ASTContext C,
SourceLocation  StartLoc,
SourceLocation  EndLoc 
)
static

Creates clause for 'atomic' directive.

Parameters
CAST context.
StartLocStarting location of the clause.
EndLocEnding location of the clause.

Definition at line 394 of file OpenMPClause.cpp.

References clang::C.

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

◆ Create() [2/2]

OMPUpdateClause * OMPUpdateClause::Create ( const ASTContext C,
SourceLocation  StartLoc,
SourceLocation  LParenLoc,
SourceLocation  ArgumentLoc,
OpenMPDependClauseKind  DK,
SourceLocation  EndLoc 
)
static

Creates clause for 'depobj' directive.

Parameters
CAST context.
StartLocStarting location of the clause.
LParenLocLocation of '('.
ArgumentLocLocation of the argument.
DKDependence kind.
EndLocEnding location of the clause.

Definition at line 401 of file OpenMPClause.cpp.

References clang::C.

◆ CreateEmpty()

OMPUpdateClause * OMPUpdateClause::CreateEmpty ( const ASTContext C,
bool  IsExtended 
)
static

Creates an empty clause with the place for N variables.

Parameters
CAST context.
IsExtendedtrue if extended clause for 'depobj' directive must be created.

Definition at line 415 of file OpenMPClause.cpp.

References clang::C.

Referenced by clang::OMPClauseReader::readClause().

◆ getArgumentLoc()

SourceLocation clang::OMPUpdateClause::getArgumentLoc ( ) const
inline

Gets the location of argument in clause for 'depobj' directive.

Definition at line 2451 of file OpenMPClause.h.

◆ getDependencyKind()

OpenMPDependClauseKind clang::OMPUpdateClause::getDependencyKind ( ) const
inline

Gets the dependence kind in clause for 'depobj' directive.

Definition at line 2457 of file OpenMPClause.h.

◆ getLParenLoc()

SourceLocation clang::OMPUpdateClause::getLParenLoc ( ) const
inline

Gets the location of '(' in clause for 'depobj' directive.

Definition at line 2445 of file OpenMPClause.h.

◆ isExtended()

bool clang::OMPUpdateClause::isExtended ( ) const
inline

Checks if the clause is the extended clauses for 'depobj' directive.

Definition at line 2427 of file OpenMPClause.h.

◆ used_children() [1/2]

child_range clang::OMPUpdateClause::used_children ( )
inline

Definition at line 2437 of file OpenMPClause.h.

◆ used_children() [2/2]

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

Definition at line 2440 of file OpenMPClause.h.

Friends And Related Function Documentation

◆ OMPClauseReader

friend class OMPClauseReader
friend

Definition at line 2351 of file OpenMPClause.h.


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