class OMPIfClause

Declaration

class OMPIfClause : public OMPClause, public OMPClauseWithPreInit { /* full declaration omitted */ };

Description

This represents 'if' clause in the '#pragma omp ...' directive. In this example directive '#pragma omp parallel' has simple 'if' clause with condition 'a > 5' and directive name modifier 'parallel'.

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

Inherits from: OMPClause, OMPClauseWithPreInit

Member Variables

private clang::SourceLocation LParenLoc
Location of '('.
private clang::Stmt* Condition = nullptr
Condition of the 'if' clause.
private clang::SourceLocation ColonLoc
Location of ':' (if any).
private clang::OpenMPDirectiveKind NameModifier = llvm::omp::OMPD_unknown
Directive name modifier for the clause.
private clang::SourceLocation NameModifierLoc
Name modifier location.

Method Overview

  • public OMPIfClause(clang::OpenMPDirectiveKind NameModifier, clang::Expr * Cond, clang::Stmt * HelperCond, clang::OpenMPDirectiveKind CaptureRegion, clang::SourceLocation StartLoc, clang::SourceLocation LParenLoc, clang::SourceLocation NameModifierLoc, clang::SourceLocation ColonLoc, clang::SourceLocation EndLoc)
  • public OMPIfClause()
  • 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::Expr * getCondition() const
  • public clang::SourceLocation getLParenLoc() const
  • public clang::OpenMPDirectiveKind getNameModifier() const
  • public clang::SourceLocation getNameModifierLoc() const
  • private void setColonLoc(clang::SourceLocation Loc)
  • private void setCondition(clang::Expr * Cond)
  • public void setLParenLoc(clang::SourceLocation Loc)
  • private void setNameModifier(clang::OpenMPDirectiveKind NM)
  • private void setNameModifierLoc(clang::SourceLocation Loc)
  • public clang::OMPClause::child_range used_children()
  • public clang::OMPClause::const_child_range used_children() const

Inherited from OMPClauseWithPreInit:

Inherited from OMPClause:

Methods

OMPIfClause(
    clang::OpenMPDirectiveKind NameModifier,
    clang::Expr* Cond,
    clang::Stmt* HelperCond,
    clang::OpenMPDirectiveKind CaptureRegion,
    clang::SourceLocation StartLoc,
    clang::SourceLocation LParenLoc,
    clang::SourceLocation NameModifierLoc,
    clang::SourceLocation ColonLoc,
    clang::SourceLocation EndLoc)

Description

Build 'if' clause with condition \a Cond.

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

Parameters

clang::OpenMPDirectiveKind NameModifier
[OpenMP 4.1] Directive name modifier of clause.
clang::Expr* Cond
Condition of the clause.
clang::Stmt* HelperCond
Helper condition for the clause.
clang::OpenMPDirectiveKind CaptureRegion
Innermost OpenMP region where expressions in this clause must be captured.
clang::SourceLocation StartLoc
Starting location of the clause.
clang::SourceLocation LParenLoc
Location of '('.
clang::SourceLocation NameModifierLoc
Location of directive name modifier.
clang::SourceLocation ColonLoc
[OpenMP 4.1] Location of ':'.
clang::SourceLocation EndLoc
Ending location of the clause.

OMPIfClause()

Description

Build an empty clause.

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

clang::OMPClause::const_child_range children()
    const

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

clang::OMPClause::child_range children()

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

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

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

Parameters

const clang::OMPClause* T

clang::SourceLocation getColonLoc() const

Description

Return the location of ':'.

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

clang::Expr* getCondition() const

Description

Returns condition.

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

clang::SourceLocation getLParenLoc() const

Description

Returns the location of '('.

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

clang::OpenMPDirectiveKind getNameModifier() const

Description

Return directive name modifier associated with the clause.

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

clang::SourceLocation getNameModifierLoc() const

Description

Return the location of directive name modifier.

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

void setColonLoc(clang::SourceLocation Loc)

Description

Set location of ':'.

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

Parameters

clang::SourceLocation Loc

void setCondition(clang::Expr* Cond)

Description

Set condition.

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

Parameters

clang::Expr* Cond

void setLParenLoc(clang::SourceLocation Loc)

Description

Sets the location of '('.

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

Parameters

clang::SourceLocation Loc

void setNameModifier(
    clang::OpenMPDirectiveKind NM)

Description

Set directive name modifier for the clause.

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

Parameters

clang::OpenMPDirectiveKind NM

void setNameModifierLoc(clang::SourceLocation Loc)

Description

Set location of directive name modifier for the clause.

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

Parameters

clang::SourceLocation Loc

clang::OMPClause::child_range used_children()

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

clang::OMPClause::const_child_range
used_children() const

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