clang 24.0.0git
OMPParallelSectionsDirective Class Reference

This represents '#pragma omp parallel sections' directive. More...

#include "clang/AST/StmtOpenMP.h"

Inheritance diagram for OMPParallelSectionsDirective:
[legend]

Public Member Functions

Expr * getTaskReductionRefExpr ()
 Returns special task reduction reference expression.
const Expr * getTaskReductionRefExpr () const
bool hasCancel () const
 Return true if current directive has inner cancel directive.

Static Public Member Functions

static OMPParallelSectionsDirectiveCreate (const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc, ArrayRef< OMPClause * > Clauses, Stmt *AssociatedStmt, Expr *TaskRedRef, bool HasCancel)
 Creates directive with a list of Clauses.
static OMPParallelSectionsDirectiveCreateEmpty (const ASTContext &C, unsigned NumClauses, EmptyShell)
 Creates an empty directive with the place for NumClauses clauses.
static bool classof (const Stmt *T)

Friends

class ASTStmtReader
class OMPExecutableDirective

Detailed Description

This represents '#pragma omp parallel sections' directive.

#pragma omp parallel sections private(a,b) reduction(+:c,d)

In this example directive '#pragma omp parallel sections' has clauses 'private' with the variables 'a' and 'b' and 'reduction' with operator '+' and variables 'c' and 'd'.

Definition at line 2516 of file StmtOpenMP.h.

Member Function Documentation

◆ classof()

bool OMPParallelSectionsDirective::classof ( const Stmt * T)
inlinestatic

Definition at line 2584 of file StmtOpenMP.h.

◆ Create()

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

Creates directive with a list of Clauses.

Parameters
CAST context.
StartLocStarting location of the directive kind.
EndLocEnding Location of the directive.
ClausesList of clauses.
AssociatedStmtStatement, associated with the directive.
TaskRedRefTask reduction special reference expression to handle taskgroup descriptor.
HasCanceltrue if current directive has inner cancel directive.

Definition at line 917 of file StmtOpenMP.cpp.

References clang::C.

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

◆ CreateEmpty()

OMPParallelSectionsDirective * OMPParallelSectionsDirective::CreateEmpty ( const ASTContext & C,
unsigned NumClauses,
EmptyShell  )
static

Creates an empty directive with the place for NumClauses clauses.

Parameters
CAST context.
NumClausesNumber of clauses.

Definition at line 929 of file StmtOpenMP.cpp.

References clang::C.

◆ getTaskReductionRefExpr() [1/2]

Expr * OMPParallelSectionsDirective::getTaskReductionRefExpr ( )
inline

Returns special task reduction reference expression.

Definition at line 2573 of file StmtOpenMP.h.

Referenced by getTaskReductionRefExpr().

◆ getTaskReductionRefExpr() [2/2]

const Expr * OMPParallelSectionsDirective::getTaskReductionRefExpr ( ) const
inline

Definition at line 2576 of file StmtOpenMP.h.

References getTaskReductionRefExpr().

◆ hasCancel()

bool OMPParallelSectionsDirective::hasCancel ( ) const
inline

Return true if current directive has inner cancel directive.

Definition at line 2582 of file StmtOpenMP.h.

◆ ASTStmtReader

friend class ASTStmtReader
friend

Definition at line 2517 of file StmtOpenMP.h.

References ASTStmtReader.

Referenced by ASTStmtReader.

◆ OMPExecutableDirective

friend class OMPExecutableDirective
friend

Definition at line 2518 of file StmtOpenMP.h.

References OMPExecutableDirective.

Referenced by OMPExecutableDirective.


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