clang 24.0.0git
OMPSectionsDirective Class Reference

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

#include "clang/AST/StmtOpenMP.h"

Inheritance diagram for OMPSectionsDirective:
[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 OMPSectionsDirectiveCreate (const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc, ArrayRef< OMPClause * > Clauses, Stmt *AssociatedStmt, Expr *TaskRedRef, bool HasCancel)
 Creates directive with a list of Clauses.
static OMPSectionsDirectiveCreateEmpty (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 sections' directive.

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

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

Definition at line 1867 of file StmtOpenMP.h.

Member Function Documentation

◆ classof()

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

Definition at line 1933 of file StmtOpenMP.h.

◆ Create()

OMPSectionsDirective * OMPSectionsDirective::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 directive.

Definition at line 693 of file StmtOpenMP.cpp.

References clang::C.

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

◆ CreateEmpty()

OMPSectionsDirective * OMPSectionsDirective::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 705 of file StmtOpenMP.cpp.

References clang::C.

◆ getTaskReductionRefExpr() [1/2]

Expr * OMPSectionsDirective::getTaskReductionRefExpr ( )
inline

Returns special task reduction reference expression.

Definition at line 1923 of file StmtOpenMP.h.

Referenced by getTaskReductionRefExpr().

◆ getTaskReductionRefExpr() [2/2]

const Expr * OMPSectionsDirective::getTaskReductionRefExpr ( ) const
inline

Definition at line 1926 of file StmtOpenMP.h.

References getTaskReductionRefExpr().

◆ hasCancel()

bool OMPSectionsDirective::hasCancel ( ) const
inline

Return true if current directive has inner cancel directive.

Definition at line 1931 of file StmtOpenMP.h.

Referenced by clang::CodeGen::CodeGenFunction::EmitOMPSectionsDirective().

◆ ASTStmtReader

friend class ASTStmtReader
friend

Definition at line 1868 of file StmtOpenMP.h.

References ASTStmtReader.

Referenced by ASTStmtReader.

◆ OMPExecutableDirective

friend class OMPExecutableDirective
friend

Definition at line 1869 of file StmtOpenMP.h.

References OMPExecutableDirective.

Referenced by OMPExecutableDirective.


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