class OMPTaskDirective

Declaration

class OMPTaskDirective : public OMPExecutableDirective { /* full declaration omitted */ };

Description

This represents '#pragma omp task' directive. In this example directive '#pragma omp task' has clauses 'private' with the variables 'a' and 'b' and 'final' with condition 'd'.

Declared at: clang/include/clang/AST/StmtOpenMP.h:2464

Inherits from: OMPExecutableDirective

Member Variables

private bool HasCancel = false
true if this directive has inner cancel directive.

Inherited from OMPExecutableDirective:

protected Data = nullptr

Inherited from Stmt:

protected

Method Overview

  • public static clang::OMPTaskDirective * Create(const clang::ASTContext & C, clang::SourceLocation StartLoc, clang::SourceLocation EndLoc, ArrayRef<clang::OMPClause *> Clauses, clang::Stmt * AssociatedStmt, bool HasCancel)
  • public static clang::OMPTaskDirective * CreateEmpty(const clang::ASTContext & C, unsigned int NumClauses, clang::Stmt::EmptyShell)
  • private OMPTaskDirective(clang::SourceLocation StartLoc, clang::SourceLocation EndLoc)
  • private OMPTaskDirective()
  • public static bool classof(const clang::Stmt * T)
  • public bool hasCancel() const
  • private void setHasCancel(bool Has)

Inherited from OMPExecutableDirective:

Inherited from Stmt:

Methods

static clang::OMPTaskDirective* Create(
    const clang::ASTContext& C,
    clang::SourceLocation StartLoc,
    clang::SourceLocation EndLoc,
    ArrayRef<clang::OMPClause*> Clauses,
    clang::Stmt* AssociatedStmt,
    bool HasCancel)

Description

Creates directive with a list of \a Clauses.

Declared at: clang/include/clang/AST/StmtOpenMP.h:2498

Parameters

const clang::ASTContext& C
AST context.
clang::SourceLocation StartLoc
Starting location of the directive kind.
clang::SourceLocation EndLoc
Ending Location of the directive.
ArrayRef<clang::OMPClause*> Clauses
List of clauses.
clang::Stmt* AssociatedStmt
Statement, associated with the directive.
bool HasCancel
true, if current directive has inner cancel directive.

static clang::OMPTaskDirective* CreateEmpty(
    const clang::ASTContext& C,
    unsigned int NumClauses,
    clang::Stmt::EmptyShell)

Description

Creates an empty directive with the place for \a NumClauses clauses.

Declared at: clang/include/clang/AST/StmtOpenMP.h:2509

Parameters

const clang::ASTContext& C
AST context.
unsigned int NumClauses
Number of clauses.
clang::Stmt::EmptyShell

OMPTaskDirective(clang::SourceLocation StartLoc,
                 clang::SourceLocation EndLoc)

Description

Build directive with the given start and end location.

Declared at: clang/include/clang/AST/StmtOpenMP.h:2475

Parameters

clang::SourceLocation StartLoc
Starting location of the directive kind.
clang::SourceLocation EndLoc
Ending location of the directive.

OMPTaskDirective()

Description

Build an empty directive.

Declared at: clang/include/clang/AST/StmtOpenMP.h:2481

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

Declared at: clang/include/clang/AST/StmtOpenMP.h:2515

Parameters

const clang::Stmt* T

bool hasCancel() const

Description

Return true if current directive has inner cancel directive.

Declared at: clang/include/clang/AST/StmtOpenMP.h:2513

void setHasCancel(bool Has)

Description

Set cancel state.

Declared at: clang/include/clang/AST/StmtOpenMP.h:2486

Parameters

bool Has