clang 24.0.0git
OpenMPClause.cpp File Reference
#include "clang/AST/OpenMPClause.h"
#include "clang/AST/ASTContext.h"
#include "clang/AST/Attr.h"
#include "clang/AST/Decl.h"
#include "clang/AST/DeclOpenMP.h"
#include "clang/AST/Expr.h"
#include "clang/AST/ExprOpenMP.h"
#include "clang/Basic/LLVM.h"
#include "clang/Basic/OpenMPKinds.h"
#include "clang/Basic/TargetInfo.h"
#include "llvm/ADT/Sequence.h"
#include "llvm/ADT/SmallPtrSet.h"
#include "llvm/Support/ErrorHandling.h"
#include <algorithm>
#include <cassert>
#include <optional>
#include "llvm/Frontend/OpenMP/OMP.inc"

Go to the source code of this file.

Macros

#define GEN_CLANG_CLAUSE_CLASS
#define CLAUSE_CLASS(Enum, Str, Class)
#define GEN_CLANG_CLAUSE_CLASS
#define CLAUSE_CLASS(Enum, Str, Class)
#define CLAUSE_NO_CLASS(Enum, Str)

Functions

static Stmt ** getAddrOfExprAsWritten (Stmt *S)
 Gets the address of the original, non-captured, expression used in the clause as the preinitializer.
template<typename T>
static void PrintMapper (raw_ostream &OS, T *Node, const PrintingPolicy &Policy)
template<typename T>
static void PrintIterator (raw_ostream &OS, T *Node, const PrintingPolicy &Policy)
static bool evalOMPAdjustArgsBound (const OMPAdjustArgsItem::Bound &Bound, unsigned NumArgs, const ASTContext &Ctx, int64_t &Result)
 Evaluate one bound of an 'adjust_args' parameter range: either an 'omp_num_args [+- logical_offset]' expression, or a plain constant integer expression.

Macro Definition Documentation

◆ CLAUSE_CLASS [1/2]

#define CLAUSE_CLASS ( Enum,
Str,
Class )
Value:
case Enum: \
return static_cast<Class *>(this)->children();
child_range children()
@ Enum
The "enum" keyword introduces the elaborated-type-specifier.
Definition TypeBase.h:6160

◆ CLAUSE_CLASS [2/2]

#define CLAUSE_CLASS ( Enum,
Str,
Class )
Value:
case Enum: \
return static_cast<Class *>(this)->used_children();
child_range used_children()

◆ CLAUSE_NO_CLASS

#define CLAUSE_NO_CLASS ( Enum,
Str )
Value:
case Enum: \
break;

◆ GEN_CLANG_CLAUSE_CLASS [1/2]

#define GEN_CLANG_CLAUSE_CLASS

◆ GEN_CLANG_CLAUSE_CLASS [2/2]

#define GEN_CLANG_CLAUSE_CLASS

Function Documentation

◆ evalOMPAdjustArgsBound()

bool evalOMPAdjustArgsBound ( const OMPAdjustArgsItem::Bound & Bound,
unsigned NumArgs,
const ASTContext & Ctx,
int64_t & Result )
static

Evaluate one bound of an 'adjust_args' parameter range: either an 'omp_num_args [+- logical_offset]' expression, or a plain constant integer expression.

An omitted bound leaves Result unchanged. Returns false if the bound is dependent or not constant.

Definition at line 3260 of file OpenMPClause.cpp.

References clang::OMPAdjustArgsItem::Bound::E, clang::OMPAdjustArgsItem::Bound::Expression, clang::Expr::getIntegerConstantExpr(), clang::Expr::IgnoreParenImpCasts(), int64_t, clang::OMPAdjustArgsItem::Bound::IsSubtraction, clang::Expr::isValueDependent(), clang::OMPAdjustArgsItem::Bound::Kind, clang::OMPAdjustArgsItem::Bound::NumArgs, and clang::OMPAdjustArgsItem::Bound::Omitted.

◆ getAddrOfExprAsWritten()

Stmt ** getAddrOfExprAsWritten ( Stmt * S)
static

◆ PrintIterator()

template<typename T>
void PrintIterator ( raw_ostream & OS,
T * Node,
const PrintingPolicy & Policy )
static

Definition at line 2774 of file OpenMPClause.cpp.

References clang::T.

◆ PrintMapper()

template<typename T>
void PrintMapper ( raw_ostream & OS,
T * Node,
const PrintingPolicy & Policy )
static

Definition at line 2764 of file OpenMPClause.cpp.

References clang::NestedNameSpecifier::print(), and clang::T.