class OMPToClause

Declaration

class OMPToClause : public OMPMappableExprListClause,
                    private TrailingObjects { /* full declaration omitted */ };

Description

This represents clause 'to' in the '#pragma omp ...' directives. In this example directive '#pragma omp target update' has clause 'to' with the variables 'a' and 'b'.

Declared at: clang/include/clang/AST/OpenMPClause.h:6667

Inherits from: OMPMappableExprListClause, TrailingObjects

Member Variables

private clang::OpenMPMotionModifierKind[2] MotionModifiers = {OMPC_MOTION_MODIFIER_unknown, OMPC_MOTION_MODIFIER_unknown}
Motion-modifiers for the 'to' clause.
private clang::SourceLocation[2] MotionModifiersLoc
Location of motion-modifiers for the 'to' clause.
private clang::SourceLocation ColonLoc
Colon location.

Method Overview

  • public static clang::OMPToClause * Create(const clang::ASTContext & C, const clang::OMPVarListLocTy & Locs, ArrayRef<clang::Expr *> Vars, ArrayRef<clang::ValueDecl *> Declarations, clang::OMPClauseMappableExprCommon::MappableExprComponentListsRef ComponentLists, ArrayRef<clang::Expr *> UDMapperRefs, ArrayRef<clang::OpenMPMotionModifierKind> MotionModifiers, ArrayRef<clang::SourceLocation> MotionModifiersLoc, clang::NestedNameSpecifierLoc UDMQualifierLoc, clang::DeclarationNameInfo MapperId)
  • public static clang::OMPToClause * CreateEmpty(const clang::ASTContext & C, const clang::OMPMappableExprListSizeTy & Sizes)
  • private OMPToClause(const clang::OMPMappableExprListSizeTy & Sizes)
  • private OMPToClause(ArrayRef<clang::OpenMPMotionModifierKind> TheMotionModifiers, ArrayRef<clang::SourceLocation> TheMotionModifiersLoc, clang::NestedNameSpecifierLoc MapperQualifierLoc, clang::DeclarationNameInfo MapperIdInfo, const clang::OMPVarListLocTy & Locs, const clang::OMPMappableExprListSizeTy & Sizes)
  • public clang::OMPClause::const_child_range children() const
  • public clang::OMPClause::child_range children()
  • public static bool classof(const clang::OMPClause * T)
  • public clang::SourceLocation getColonLoc() const
  • public clang::OpenMPMotionModifierKind getMotionModifier(unsigned int Cnt) const
  • public clang::SourceLocation getMotionModifierLoc(unsigned int Cnt) const
  • public ArrayRef<clang::OpenMPMotionModifierKind> getMotionModifiers() const
  • public ArrayRef<clang::SourceLocation> getMotionModifiersLoc() const
  • private size_t numTrailingObjects(OverloadToken<unsigned int>) const
  • private size_t numTrailingObjects(OverloadToken<clang::ValueDecl *>) const
  • private size_t numTrailingObjects(OverloadToken<clang::Expr *>) const
  • private void setColonLoc(clang::SourceLocation Loc)
  • private void setMotionModifier(unsigned int I, clang::OpenMPMotionModifierKind T)
  • private void setMotionModifierLoc(unsigned int I, clang::SourceLocation TLoc)
  • public clang::OMPClause::child_range used_children()
  • public clang::OMPClause::const_child_range used_children() const

Methods

static clang::OMPToClause* Create(
    const clang::ASTContext& C,
    const clang::OMPVarListLocTy& Locs,
    ArrayRef<clang::Expr*> Vars,
    ArrayRef<clang::ValueDecl*> Declarations,
    clang::OMPClauseMappableExprCommon::
        MappableExprComponentListsRef
            ComponentLists,
    ArrayRef<clang::Expr*> UDMapperRefs,
    ArrayRef<clang::OpenMPMotionModifierKind>
        MotionModifiers,
    ArrayRef<clang::SourceLocation>
        MotionModifiersLoc,
    clang::NestedNameSpecifierLoc UDMQualifierLoc,
    clang::DeclarationNameInfo MapperId)

Description

Creates clause with a list of variables \a Vars.

Declared at: clang/include/clang/AST/OpenMPClause.h:6785

Parameters

const clang::ASTContext& C
AST context.
const clang::OMPVarListLocTy& Locs
Locations needed to build a mappable clause. It includes 1) StartLoc: starting location of the clause (the clause keyword); 2) LParenLoc: location of '('; 3) EndLoc: ending location of the clause.
ArrayRef<clang::Expr*> Vars
The original expression used in the clause.
ArrayRef<clang::ValueDecl*> Declarations
Declarations used in the clause.
clang::OMPClauseMappableExprCommon:: MappableExprComponentListsRef ComponentLists
Component lists used in the clause.
ArrayRef<clang::Expr*> UDMapperRefs
References to user-defined mappers associated with expressions used in the clause.
ArrayRef<clang::OpenMPMotionModifierKind> MotionModifiers
Motion-modifiers.
ArrayRef<clang::SourceLocation> MotionModifiersLoc
Location of motion-modifiers.
clang::NestedNameSpecifierLoc UDMQualifierLoc
C++ nested name specifier for the associated user-defined mapper.
clang::DeclarationNameInfo MapperId
The identifier of associated user-defined mapper.

static clang::OMPToClause* CreateEmpty(
    const clang::ASTContext& C,
    const clang::OMPMappableExprListSizeTy& Sizes)

Description

Creates an empty clause with the place for \a NumVars variables.

Declared at: clang/include/clang/AST/OpenMPClause.h:6803

Parameters

const clang::ASTContext& C
AST context.
const clang::OMPMappableExprListSizeTy& Sizes
All required sizes to build a mappable clause. It includes 1) NumVars: number of expressions listed in this clause; 2) NumUniqueDeclarations: number of unique base declarations in this clause; 3) NumComponentLists: number of component lists in this clause; and 4) NumComponents: total number of expression components in the clause.

OMPToClause(
    const clang::OMPMappableExprListSizeTy& Sizes)

Description

Build an empty clause.

Declared at: clang/include/clang/AST/OpenMPClause.h:6727

Parameters

const clang::OMPMappableExprListSizeTy& Sizes
All required sizes to build a mappable clause. It includes 1) NumVars: number of expressions listed in this clause; 2) NumUniqueDeclarations: number of unique base declarations in this clause; 3) NumComponentLists: number of component lists in this clause; and 4) NumComponents: total number of expression components in the clause.

OMPToClause(
    ArrayRef<clang::OpenMPMotionModifierKind>
        TheMotionModifiers,
    ArrayRef<clang::SourceLocation>
        TheMotionModifiersLoc,
    clang::NestedNameSpecifierLoc
        MapperQualifierLoc,
    clang::DeclarationNameInfo MapperIdInfo,
    const clang::OMPVarListLocTy& Locs,
    const clang::OMPMappableExprListSizeTy& Sizes)

Description

Build clause with number of variables \a NumVars.

Declared at: clang/include/clang/AST/OpenMPClause.h:6701

Parameters

ArrayRef<clang::OpenMPMotionModifierKind> TheMotionModifiers
Motion-modifiers.
ArrayRef<clang::SourceLocation> TheMotionModifiersLoc
Locations of motion-modifiers.
clang::NestedNameSpecifierLoc MapperQualifierLoc
C++ nested name specifier for the associated user-defined mapper.
clang::DeclarationNameInfo MapperIdInfo
The identifier of associated user-defined mapper.
const clang::OMPVarListLocTy& Locs
Locations needed to build a mappable clause. It includes 1) StartLoc: starting location of the clause (the clause keyword); 2) LParenLoc: location of '('; 3) EndLoc: ending location of the clause.
const clang::OMPMappableExprListSizeTy& Sizes
All required sizes to build a mappable clause. It includes 1) NumVars: number of expressions listed in this clause; 2) NumUniqueDeclarations: number of unique base declarations in this clause; 3) NumComponentLists: number of component lists in this clause; and 4) NumComponents: total number of expression components in the clause.

clang::OMPClause::const_child_range children()
    const

Declared at: clang/include/clang/AST/OpenMPClause.h:6843

clang::OMPClause::child_range children()

Declared at: clang/include/clang/AST/OpenMPClause.h:6838

static bool classof(const clang::OMPClause* T)

Declared at: clang/include/clang/AST/OpenMPClause.h:6855

Parameters

const clang::OMPClause* T

clang::SourceLocation getColonLoc() const

Description

Get colon location.

Declared at: clang/include/clang/AST/OpenMPClause.h:6836

clang::OpenMPMotionModifierKind getMotionModifier(
    unsigned int Cnt) const

Description

Fetches the motion-modifier at 'Cnt' index of array of modifiers.

Declared at: clang/include/clang/AST/OpenMPClause.h:6809

Parameters

unsigned int Cnt
index for motion-modifier.

clang::SourceLocation getMotionModifierLoc(
    unsigned int Cnt) const

Description

Fetches the motion-modifier location at 'Cnt' index of array of modifiers' locations.

Declared at: clang/include/clang/AST/OpenMPClause.h:6819

Parameters

unsigned int Cnt
index for motion-modifier location.

ArrayRef<clang::OpenMPMotionModifierKind>
getMotionModifiers() const

Description

Fetches ArrayRef of motion-modifiers.

Declared at: clang/include/clang/AST/OpenMPClause.h:6826

ArrayRef<clang::SourceLocation>
getMotionModifiersLoc() const

Description

Fetches ArrayRef of location of motion-modifiers.

Declared at: clang/include/clang/AST/OpenMPClause.h:6831

size_t numTrailingObjects(
    OverloadToken<unsigned int>) const

Declared at: clang/include/clang/AST/OpenMPClause.h:6764

Parameters

OverloadToken<unsigned int>

size_t numTrailingObjects(
    OverloadToken<clang::ValueDecl*>) const

Declared at: clang/include/clang/AST/OpenMPClause.h:6761

Parameters

OverloadToken<clang::ValueDecl*>

size_t numTrailingObjects(
    OverloadToken<clang::Expr*>) const

Description

Define the sizes of each trailing object array except the last one. This is required for TrailingObjects to work properly.

Declared at: clang/include/clang/AST/OpenMPClause.h:6756

Parameters

OverloadToken<clang::Expr*>

void setColonLoc(clang::SourceLocation Loc)

Description

Set colon location.

Declared at: clang/include/clang/AST/OpenMPClause.h:6752

Parameters

clang::SourceLocation Loc

void setMotionModifier(
    unsigned int I,
    clang::OpenMPMotionModifierKind T)

Description

Set motion-modifier for the clause.

Declared at: clang/include/clang/AST/OpenMPClause.h:6735

Parameters

unsigned int I
index for motion-modifier.
clang::OpenMPMotionModifierKind T
motion-modifier for the clause.

void setMotionModifierLoc(
    unsigned int I,
    clang::SourceLocation TLoc)

Description

Set location for the motion-modifier.

Declared at: clang/include/clang/AST/OpenMPClause.h:6745

Parameters

unsigned int I
index for motion-modifier location.
clang::SourceLocation TLoc
motion-modifier location.

clang::OMPClause::child_range used_children()

Declared at: clang/include/clang/AST/OpenMPClause.h:6848

clang::OMPClause::const_child_range
used_children() const

Declared at: clang/include/clang/AST/OpenMPClause.h:6851