clang 23.0.0git
OMPInitClause Class Referencefinal

This represents the 'init' clause in '#pragma omp ...' directives. More...

#include "clang/AST/OpenMPClause.h"

Inheritance diagram for OMPInitClause:
[legend]

Classes

struct  PrefView

Public Member Functions

SourceLocation getVarLoc () const
 Returns the location of the interop variable.
Expr * getInteropVar ()
 Returns the interop variable.
const Expr * getInteropVar () const
bool getIsTarget () const
 Returns true is interop-type 'target' is used.
bool getIsTargetSync () const
 Returns true is interop-type 'targetsync' is used.
bool hasPreferAttrs () const
 Returns true if OMP 6.0 {fr/attr} syntax is used.
ArrayRef< Expr * > attrs () const
 All attr() exprs across every pref-spec, in pref-spec order (flat block).
child_range children ()
const_child_range children () const
child_range used_children ()
const_child_range used_children () const
auto prefs () const
 Returns a range of PrefView objects, one per preference-specification, each carrying the fr() expression (or null) and the attr() exprs.

Static Public Member Functions

static OMPInitClauseCreate (const ASTContext &C, Expr *InteropVar, OMPInteropInfo &InteropInfo, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation VarLoc, SourceLocation EndLoc)
 Creates a fully specified clause.
static OMPInitClauseCreateEmpty (const ASTContext &C, unsigned NumPrefs, unsigned NumAttrs)
 Creates an empty clause sized for NumPrefs pref-specs and NumAttrs total attr() exprs across them.
static bool classof (const OMPClause *T)

Friends

class OMPClauseReader

Detailed Description

This represents the 'init' clause in '#pragma omp ...' directives.

#pragma omp interop init(target:obj)

Definition at line 8852 of file OpenMPClause.h.

Member Function Documentation

◆ attrs()

ArrayRef< Expr * > OMPInitClause::attrs ( ) const
inline

All attr() exprs across every pref-spec, in pref-spec order (flat block).

Definition at line 8986 of file OpenMPClause.h.

◆ children() [1/2]

child_range OMPInitClause::children ( )
inline

Definition at line 8991 of file OpenMPClause.h.

Referenced by children().

◆ children() [2/2]

const_child_range OMPInitClause::children ( ) const
inline

Definition at line 8997 of file OpenMPClause.h.

References children().

◆ classof()

bool OMPInitClause::classof ( const OMPClause * T)
inlinestatic

Definition at line 9023 of file OpenMPClause.h.

◆ Create()

OMPInitClause * OMPInitClause::Create ( const ASTContext & C,
Expr * InteropVar,
OMPInteropInfo & InteropInfo,
SourceLocation StartLoc,
SourceLocation LParenLoc,
SourceLocation VarLoc,
SourceLocation EndLoc )
static

Creates a fully specified clause.

Parameters
CAST context.
InteropVarThe interop variable.
InteropInfoThe interop-type and prefer_type list.
StartLocStarting location of the clause.
LParenLocLocation of '('.
VarLocLocation of the interop variable.
EndLocEnding location of the clause.

Definition at line 1801 of file OpenMPClause.cpp.

References clang::OMPInteropPref::Attrs, clang::C, clang::OMPInteropInfo::HasPreferAttrs, clang::OMPInteropInfo::IsTarget, clang::OMPInteropInfo::IsTargetSync, and clang::OMPInteropInfo::Prefs.

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

◆ CreateEmpty()

OMPInitClause * OMPInitClause::CreateEmpty ( const ASTContext & C,
unsigned NumPrefs,
unsigned NumAttrs )
static

Creates an empty clause sized for NumPrefs pref-specs and NumAttrs total attr() exprs across them.

Parameters
CAST context.
NumPrefsNumber of pref-specs (length of the Fr block).
NumAttrsTotal attr() exprs across all pref-specs.

Definition at line 1837 of file OpenMPClause.cpp.

References clang::C.

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

◆ getInteropVar() [1/2]

Expr * OMPInitClause::getInteropVar ( )
inline

Returns the interop variable.

Definition at line 8973 of file OpenMPClause.h.

◆ getInteropVar() [2/2]

const Expr * OMPInitClause::getInteropVar ( ) const
inline

Definition at line 8974 of file OpenMPClause.h.

◆ getIsTarget()

bool OMPInitClause::getIsTarget ( ) const
inline

Returns true is interop-type 'target' is used.

Definition at line 8977 of file OpenMPClause.h.

◆ getIsTargetSync()

bool OMPInitClause::getIsTargetSync ( ) const
inline

Returns true is interop-type 'targetsync' is used.

Definition at line 8980 of file OpenMPClause.h.

◆ getVarLoc()

SourceLocation OMPInitClause::getVarLoc ( ) const
inline

Returns the location of the interop variable.

Definition at line 8970 of file OpenMPClause.h.

◆ hasPreferAttrs()

bool OMPInitClause::hasPreferAttrs ( ) const
inline

Returns true if OMP 6.0 {fr/attr} syntax is used.

Definition at line 8983 of file OpenMPClause.h.

◆ prefs()

auto OMPInitClause::prefs ( ) const
inline

Returns a range of PrefView objects, one per preference-specification, each carrying the fr() expression (or null) and the attr() exprs.

Definition at line 9010 of file OpenMPClause.h.

◆ used_children() [1/2]

child_range OMPInitClause::used_children ( )
inline

Definition at line 9001 of file OpenMPClause.h.

◆ used_children() [2/2]

const_child_range OMPInitClause::used_children ( ) const
inline

Definition at line 9004 of file OpenMPClause.h.

◆ OMPClauseReader

friend class OMPClauseReader
friend

Definition at line 8855 of file OpenMPClause.h.

References OMPClauseReader.

Referenced by OMPClauseReader.


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