clang  6.0.0svn
Macros | Enumerations | Functions
SemaOpenMP.cpp File Reference

This file implements semantic analysis for OpenMP directives and clauses. More...

#include "TreeTransform.h"
#include "clang/AST/ASTContext.h"
#include "clang/AST/ASTMutationListener.h"
#include "clang/AST/CXXInheritance.h"
#include "clang/AST/Decl.h"
#include "clang/AST/DeclCXX.h"
#include "clang/AST/DeclOpenMP.h"
#include "clang/AST/StmtCXX.h"
#include "clang/AST/StmtOpenMP.h"
#include "clang/AST/StmtVisitor.h"
#include "clang/Basic/OpenMPKinds.h"
#include "clang/Sema/Initialization.h"
#include "clang/Sema/Lookup.h"
#include "clang/Sema/Scope.h"
#include "clang/Sema/ScopeInfo.h"
#include "clang/Sema/SemaInternal.h"
#include "llvm/ADT/PointerEmbeddedInt.h"
Include dependency graph for SemaOpenMP.cpp:

Go to the source code of this file.

Macros

#define DSAStack   static_cast<DSAStackTy *>(VarDataSharingAttributesStack)
 

Enumerations

enum  DefaultDataSharingAttributes
 Default data sharing attributes, which can be applied to directive. More...
 
enum  DefaultMapAttributes
 Attributes of the defaultmap clause. More...
 

Functions

static ExprCheckMapClauseExpressionBase (Sema &SemaRef, Expr *E, OMPClauseMappableExprCommon::MappableExprComponentList &CurComponents, OpenMPClauseKind CKind)
 
static ExprgetExprAsWritten (Expr *E)
 
static ValueDeclgetCanonicalDecl (ValueDecl *D)
 
static VarDeclbuildVarDecl (Sema &SemaRef, SourceLocation Loc, QualType Type, StringRef Name, const AttrVec *Attrs=nullptr)
 Build a variable declaration for OpenMP loop iteration variable. More...
 
static DeclRefExprbuildDeclRefExpr (Sema &S, VarDecl *D, QualType Ty, SourceLocation Loc, bool RefersToCapture=false)
 
static bool FinishOpenMPLinearClause (OMPLinearClause &Clause, DeclRefExpr *IV, Expr *NumIterations, Sema &SemaRef, Scope *S, DSAStackTy *Stack)
 
static void ReportOriginalDSA (Sema &SemaRef, DSAStackTy *Stack, const ValueDecl *D, DSAStackTy::DSAVarData DVar, bool IsLoopIterVar=false)
 
static OMPCapturedExprDeclbuildCaptureDecl (Sema &S, IdentifierInfo *Id, Expr *CaptureExpr, bool WithInit, bool AsExpression)
 
static DeclRefExprbuildCapture (Sema &S, ValueDecl *D, Expr *CaptureExpr, bool WithInit)
 
static ExprResult buildCapture (Sema &S, Expr *CaptureExpr, DeclRefExpr *&Ref)
 
static bool checkCancelRegion (Sema &SemaRef, OpenMPDirectiveKind CurrentRegion, OpenMPDirectiveKind CancelRegion, SourceLocation StartLoc)
 
static bool checkNestingOfRegions (Sema &SemaRef, DSAStackTy *Stack, OpenMPDirectiveKind CurrentRegion, const DeclarationNameInfo &CurrentName, OpenMPDirectiveKind CancelRegion, SourceLocation StartLoc)
 
static bool checkIfClauses (Sema &S, OpenMPDirectiveKind Kind, ArrayRef< OMPClause *> Clauses, ArrayRef< OpenMPDirectiveKind > AllowedNameModifiers)
 
static bool CheckOpenMPIterationSpace (OpenMPDirectiveKind DKind, Stmt *S, Sema &SemaRef, DSAStackTy &DSA, unsigned CurrentNestedLoopCount, unsigned NestedLoopCount, Expr *CollapseLoopCountExpr, Expr *OrderedLoopCountExpr, llvm::DenseMap< ValueDecl *, Expr *> &VarsWithImplicitDSA, LoopIterationSpace &ResultIterSpace, llvm::MapVector< Expr *, DeclRefExpr *> &Captures)
 Called on a for stmt to check and extract its iteration space for further processing (such as collapsing). More...
 
static ExprResult BuildCounterInit (Sema &SemaRef, Scope *S, SourceLocation Loc, ExprResult VarRef, ExprResult Start, llvm::MapVector< Expr *, DeclRefExpr *> &Captures)
 Build 'VarRef = Start. More...
 
static ExprResult BuildCounterUpdate (Sema &SemaRef, Scope *S, SourceLocation Loc, ExprResult VarRef, ExprResult Start, ExprResult Iter, ExprResult Step, bool Subtract, llvm::MapVector< Expr *, DeclRefExpr *> *Captures=nullptr)
 Build 'VarRef = Start + Iter * Step'. More...
 
static ExprResult WidenIterationCount (unsigned Bits, Expr *E, Sema &SemaRef)
 Convert integer expression E to make it have at least Bits bits. More...
 
static bool FitsInto (unsigned Bits, bool Signed, Expr *E, Sema &SemaRef)
 Check if the given expression E is a constant integer that fits into Bits bits. More...
 
static StmtbuildPreInits (ASTContext &Context, SmallVectorImpl< Decl *> &PreInits)
 Build preinits statement for the given declarations. More...
 
static StmtbuildPreInits (ASTContext &Context, llvm::MapVector< Expr *, DeclRefExpr *> &Captures)
 Build preinits statement for the given declarations. More...
 
static ExprbuildPostUpdate (Sema &S, ArrayRef< Expr *> PostUpdates)
 Build postupdate expression for the given list of postupdates expressions. More...
 
static unsigned CheckOpenMPLoop (OpenMPDirectiveKind DKind, Expr *CollapseLoopCountExpr, Expr *OrderedLoopCountExpr, Stmt *AStmt, Sema &SemaRef, DSAStackTy &DSA, llvm::DenseMap< ValueDecl *, Expr *> &VarsWithImplicitDSA, OMPLoopDirective::HelperExprs &Built)
 Called on a for stmt to check itself and nested loops (if any). More...
 
static ExprgetCollapseNumberExpr (ArrayRef< OMPClause *> Clauses)
 
static ExprgetOrderedNumberExpr (ArrayRef< OMPClause *> Clauses)
 
static bool checkSimdlenSafelenSpecified (Sema &S, const ArrayRef< OMPClause *> Clauses)
 
static bool hasClauses (ArrayRef< OMPClause *> Clauses, const OpenMPClauseKind K)
 Check for existence of a map clause in the list of clauses. More...
 
template<typename... Params>
static bool hasClauses (ArrayRef< OMPClause *> Clauses, const OpenMPClauseKind K, const Params... ClauseTypes)
 
static bool checkGrainsizeNumTasksClauses (Sema &S, ArrayRef< OMPClause *> Clauses)
 
static bool checkReductionClauseWithNogroup (Sema &S, ArrayRef< OMPClause *> Clauses)
 
static OpenMPDirectiveKind getOpenMPCaptureRegionForClause (OpenMPDirectiveKind DKind, OpenMPClauseKind CKind, OpenMPDirectiveKind NameModifier=OMPD_unknown)
 
static bool IsNonNegativeIntegerValue (Expr *&ValExpr, Sema &SemaRef, OpenMPClauseKind CKind, bool StrictlyPositive)
 
static std::string getListOfPossibleValues (OpenMPClauseKind K, unsigned First, unsigned Last, ArrayRef< unsigned > Exclude=llvm::None)
 
static bool checkScheduleModifiers (Sema &S, OpenMPScheduleClauseModifier M1, OpenMPScheduleClauseModifier M2, SourceLocation M1Loc, SourceLocation M2Loc)
 
static std::pair< ValueDecl *, boolgetPrivateItem (Sema &S, Expr *&RefExpr, SourceLocation &ELoc, SourceRange &ERange, bool AllowArraySection=false)
 
template<typename T >
static T filterLookupForUDR (SmallVectorImpl< UnresolvedSet< 8 >> &Lookups, const llvm::function_ref< T(ValueDecl *)> &Gen)
 
static ExprResult buildDeclareReductionRef (Sema &SemaRef, SourceLocation Loc, SourceRange Range, Scope *S, CXXScopeSpec &ReductionIdScopeSpec, const DeclarationNameInfo &ReductionId, QualType Ty, CXXCastPath &BasePath, Expr *UnresolvedReduction)
 
static bool ActOnOMPReductionKindClause (Sema &S, DSAStackTy *Stack, OpenMPClauseKind ClauseKind, ArrayRef< Expr *> VarList, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation ColonLoc, SourceLocation EndLoc, CXXScopeSpec &ReductionIdScopeSpec, const DeclarationNameInfo &ReductionId, ArrayRef< Expr *> UnresolvedReductions, ReductionData &RD)
 
static bool CheckTypeMappable (SourceLocation SL, SourceRange SR, Sema &SemaRef, DSAStackTy *Stack, QualType QTy)
 
static bool CheckArrayExpressionDoesNotReferToWholeSize (Sema &SemaRef, const Expr *E, QualType BaseQTy)
 Return true if it can be proven that the provided array expression (array section or array subscript) does NOT specify the whole size of the array whose base type is BaseQTy. More...
 
static bool CheckArrayExpressionDoesNotReferToUnitySize (Sema &SemaRef, const Expr *E, QualType BaseQTy)
 
static bool CheckMapConflicts (Sema &SemaRef, DSAStackTy *DSAS, ValueDecl *VD, Expr *E, bool CurrentRegionOnly, OMPClauseMappableExprCommon::MappableExprComponentListRef CurComponents, OpenMPClauseKind CKind)
 
static void checkMappableExpressionList (Sema &SemaRef, DSAStackTy *DSAS, OpenMPClauseKind CKind, MappableVarListInfo &MVLI, SourceLocation StartLoc, OpenMPMapClauseKind MapType=OMPC_MAP_unknown, bool IsMapTypeImplicit=false)
 
static void checkDeclInTargetContext (SourceLocation SL, SourceRange SR, Sema &SemaRef, Decl *D)
 
static bool checkValueDeclInTarget (SourceLocation SL, SourceRange SR, Sema &SemaRef, DSAStackTy *Stack, ValueDecl *VD)
 

Detailed Description

This file implements semantic analysis for OpenMP directives and clauses.

Definition in file SemaOpenMP.cpp.

Macro Definition Documentation

◆ DSAStack

#define DSAStack   static_cast<DSAStackTy *>(VarDataSharingAttributesStack)

Definition at line 1146 of file SemaOpenMP.cpp.

Referenced by clang::Sema::ActOnOpenMPCancelDirective(), clang::Sema::ActOnOpenMPCancellationPointDirective(), clang::Sema::ActOnOpenMPCopyinClause(), clang::Sema::ActOnOpenMPCopyprivateClause(), clang::Sema::ActOnOpenMPDefaultClause(), clang::Sema::ActOnOpenMPDefaultmapClause(), clang::Sema::ActOnOpenMPDependClause(), clang::Sema::ActOnOpenMPDeviceClause(), clang::Sema::ActOnOpenMPDistributeDirective(), clang::Sema::ActOnOpenMPDistributeParallelForDirective(), clang::Sema::ActOnOpenMPDistributeParallelForSimdDirective(), clang::Sema::ActOnOpenMPDistributeSimdDirective(), clang::Sema::ActOnOpenMPExecutableDirective(), clang::Sema::ActOnOpenMPFirstprivateClause(), clang::Sema::ActOnOpenMPForDirective(), clang::Sema::ActOnOpenMPForSimdDirective(), clang::Sema::ActOnOpenMPFromClause(), clang::Sema::ActOnOpenMPIfClause(), clang::Sema::ActOnOpenMPInReductionClause(), clang::Sema::ActOnOpenMPIsDevicePtrClause(), clang::Sema::ActOnOpenMPLastprivateClause(), clang::Sema::ActOnOpenMPLinearClause(), clang::Sema::ActOnOpenMPLoopInitialization(), clang::Sema::ActOnOpenMPMapClause(), clang::Sema::ActOnOpenMPNowaitClause(), clang::Sema::ActOnOpenMPNumTeamsClause(), clang::Sema::ActOnOpenMPNumThreadsClause(), clang::Sema::ActOnOpenMPOrderedClause(), clang::Sema::ActOnOpenMPOrderedDirective(), clang::Sema::ActOnOpenMPParallelForDirective(), clang::Sema::ActOnOpenMPParallelForSimdDirective(), clang::Sema::ActOnOpenMPParallelSectionsDirective(), clang::Sema::ActOnOpenMPPrivateClause(), clang::Sema::ActOnOpenMPReductionClause(), clang::Sema::ActOnOpenMPRegionEnd(), clang::Sema::ActOnOpenMPSectionDirective(), clang::Sema::ActOnOpenMPSectionsDirective(), clang::Sema::ActOnOpenMPSharedClause(), clang::Sema::ActOnOpenMPSimdDirective(), clang::Sema::ActOnOpenMPTargetDirective(), clang::Sema::ActOnOpenMPTargetParallelForDirective(), clang::Sema::ActOnOpenMPTargetParallelForSimdDirective(), clang::Sema::ActOnOpenMPTargetSimdDirective(), clang::Sema::ActOnOpenMPTargetTeamsDistributeDirective(), clang::Sema::ActOnOpenMPTargetTeamsDistributeParallelForDirective(), clang::Sema::ActOnOpenMPTargetTeamsDistributeParallelForSimdDirective(), clang::Sema::ActOnOpenMPTargetTeamsDistributeSimdDirective(), clang::Sema::ActOnOpenMPTaskLoopDirective(), clang::Sema::ActOnOpenMPTaskLoopSimdDirective(), clang::Sema::ActOnOpenMPTaskReductionClause(), clang::Sema::ActOnOpenMPTeamsDistributeDirective(), clang::Sema::ActOnOpenMPTeamsDistributeParallelForDirective(), clang::Sema::ActOnOpenMPTeamsDistributeParallelForSimdDirective(), clang::Sema::ActOnOpenMPTeamsDistributeSimdDirective(), clang::Sema::ActOnOpenMPThreadLimitClause(), clang::Sema::ActOnOpenMPToClause(), clang::Sema::ActOnOpenMPUseDevicePtrClause(), clang::Sema::checkDeclIsAllowedInOpenMPTarget(), clang::Sema::EndOpenMPClause(), clang::Sema::EndOpenMPDSABlock(), clang::Sema::IsOpenMPCapturedByRef(), clang::Sema::IsOpenMPCapturedDecl(), clang::Sema::isOpenMPPrivateDecl(), clang::Sema::isOpenMPTargetCapturedDecl(), clang::Sema::StartOpenMPClause(), and clang::Sema::StartOpenMPDSABlock().

Enumeration Type Documentation

◆ DefaultDataSharingAttributes

Default data sharing attributes, which can be applied to directive.

Definition at line 45 of file SemaOpenMP.cpp.

◆ DefaultMapAttributes

Attributes of the defaultmap clause.

Definition at line 52 of file SemaOpenMP.cpp.

Function Documentation

◆ ActOnOMPReductionKindClause()

static bool ActOnOMPReductionKindClause ( Sema S,
DSAStackTy *  Stack,
OpenMPClauseKind  ClauseKind,
ArrayRef< Expr *>  VarList,
SourceLocation  StartLoc,
SourceLocation  LParenLoc,
SourceLocation  ColonLoc,
SourceLocation  EndLoc,
CXXScopeSpec ReductionIdScopeSpec,
const DeclarationNameInfo ReductionId,
ArrayRef< Expr *>  UnresolvedReductions,
ReductionData &  RD 
)
static

◆ buildCapture() [1/2]

static DeclRefExpr* buildCapture ( Sema S,
ValueDecl D,
Expr CaptureExpr,
bool  WithInit 
)
static

◆ buildCapture() [2/2]

static ExprResult buildCapture ( Sema S,
Expr CaptureExpr,
DeclRefExpr *&  Ref 
)
static

◆ buildCaptureDecl()

static OMPCapturedExprDecl* buildCaptureDecl ( Sema S,
IdentifierInfo Id,
Expr CaptureExpr,
bool  WithInit,
bool  AsExpression 
)
static

◆ BuildCounterInit()

static ExprResult BuildCounterInit ( Sema SemaRef,
Scope S,
SourceLocation  Loc,
ExprResult  VarRef,
ExprResult  Start,
llvm::MapVector< Expr *, DeclRefExpr *> &  Captures 
)
static

◆ BuildCounterUpdate()

static ExprResult BuildCounterUpdate ( Sema SemaRef,
Scope S,
SourceLocation  Loc,
ExprResult  VarRef,
ExprResult  Start,
ExprResult  Iter,
ExprResult  Step,
bool  Subtract,
llvm::MapVector< Expr *, DeclRefExpr *> *  Captures = nullptr 
)
static

◆ buildDeclareReductionRef()

static ExprResult buildDeclareReductionRef ( Sema SemaRef,
SourceLocation  Loc,
SourceRange  Range,
Scope S,
CXXScopeSpec ReductionIdScopeSpec,
const DeclarationNameInfo ReductionId,
QualType  Ty,
CXXCastPath BasePath,
Expr UnresolvedReduction 
)
static

◆ buildDeclRefExpr()

static DeclRefExpr* buildDeclRefExpr ( Sema S,
VarDecl D,
QualType  Ty,
SourceLocation  Loc,
bool  RefersToCapture = false 
)
static

◆ buildPostUpdate()

static Expr* buildPostUpdate ( Sema S,
ArrayRef< Expr *>  PostUpdates 
)
static

Build postupdate expression for the given list of postupdates expressions.

Definition at line 4347 of file SemaOpenMP.cpp.

References clang::Sema::BuildCStyleCastExpr(), clang::Sema::Context, clang::Expr::getExprLoc(), clang::ASTContext::getTrivialTypeSourceInfo(), and clang::ASTContext::VoidTy.

◆ buildPreInits() [1/2]

static Stmt* buildPreInits ( ASTContext Context,
SmallVectorImpl< Decl *> &  PreInits 
)
static

◆ buildPreInits() [2/2]

static Stmt* buildPreInits ( ASTContext Context,
llvm::MapVector< Expr *, DeclRefExpr *> &  Captures 
)
static

Build preinits statement for the given declarations.

Definition at line 4335 of file SemaOpenMP.cpp.

◆ buildVarDecl()

static VarDecl* buildVarDecl ( Sema SemaRef,
SourceLocation  Loc,
QualType  Type,
StringRef  Name,
const AttrVec Attrs = nullptr 
)
static

◆ CheckArrayExpressionDoesNotReferToUnitySize()

static bool CheckArrayExpressionDoesNotReferToUnitySize ( Sema SemaRef,
const Expr E,
QualType  BaseQTy 
)
static

Definition at line 10824 of file SemaOpenMP.cpp.

Referenced by CheckMapClauseExpressionBase().

◆ CheckArrayExpressionDoesNotReferToWholeSize()

static bool CheckArrayExpressionDoesNotReferToWholeSize ( Sema SemaRef,
const Expr E,
QualType  BaseQTy 
)
static

Return true if it can be proven that the provided array expression (array section or array subscript) does NOT specify the whole size of the array whose base type is BaseQTy.

Definition at line 10770 of file SemaOpenMP.cpp.

Referenced by CheckMapClauseExpressionBase(), and CheckMapConflicts().

◆ checkCancelRegion()

static bool checkCancelRegion ( Sema SemaRef,
OpenMPDirectiveKind  CurrentRegion,
OpenMPDirectiveKind  CancelRegion,
SourceLocation  StartLoc 
)
static

◆ checkDeclInTargetContext()

static void checkDeclInTargetContext ( SourceLocation  SL,
SourceRange  SR,
Sema SemaRef,
Decl D 
)
static

◆ checkGrainsizeNumTasksClauses()

static bool checkGrainsizeNumTasksClauses ( Sema S,
ArrayRef< OMPClause *>  Clauses 
)
static

◆ checkIfClauses()

static bool checkIfClauses ( Sema S,
OpenMPDirectiveKind  Kind,
ArrayRef< OMPClause *>  Clauses,
ArrayRef< OpenMPDirectiveKind AllowedNameModifiers 
)
static

◆ CheckMapClauseExpressionBase()

static Expr * CheckMapClauseExpressionBase ( Sema SemaRef,
Expr E,
OMPClauseMappableExprCommon::MappableExprComponentList CurComponents,
OpenMPClauseKind  CKind 
)
static

◆ CheckMapConflicts()

static bool CheckMapConflicts ( Sema SemaRef,
DSAStackTy *  DSAS,
ValueDecl VD,
Expr E,
bool  CurrentRegionOnly,
OMPClauseMappableExprCommon::MappableExprComponentListRef  CurComponents,
OpenMPClauseKind  CKind 
)
static

◆ checkMappableExpressionList()

static void checkMappableExpressionList ( Sema SemaRef,
DSAStackTy *  DSAS,
OpenMPClauseKind  CKind,
MappableVarListInfo &  MVLI,
SourceLocation  StartLoc,
OpenMPMapClauseKind  MapType = OMPC_MAP_unknown,
bool  IsMapTypeImplicit = false 
)
static

◆ checkNestingOfRegions()

static bool checkNestingOfRegions ( Sema SemaRef,
DSAStackTy *  Stack,
OpenMPDirectiveKind  CurrentRegion,
const DeclarationNameInfo CurrentName,
OpenMPDirectiveKind  CancelRegion,
SourceLocation  StartLoc 
)
static

◆ CheckOpenMPIterationSpace()

static bool CheckOpenMPIterationSpace ( OpenMPDirectiveKind  DKind,
Stmt S,
Sema SemaRef,
DSAStackTy &  DSA,
unsigned  CurrentNestedLoopCount,
unsigned  NestedLoopCount,
Expr CollapseLoopCountExpr,
Expr OrderedLoopCountExpr,
llvm::DenseMap< ValueDecl *, Expr *> &  VarsWithImplicitDSA,
LoopIterationSpace &  ResultIterSpace,
llvm::MapVector< Expr *, DeclRefExpr *> &  Captures 
)
static

Called on a for stmt to check and extract its iteration space for further processing (such as collapsing).

Definition at line 4049 of file SemaOpenMP.cpp.

Referenced by CheckOpenMPLoop().

◆ CheckOpenMPLoop()

static unsigned CheckOpenMPLoop ( OpenMPDirectiveKind  DKind,
Expr CollapseLoopCountExpr,
Expr OrderedLoopCountExpr,
Stmt AStmt,
Sema SemaRef,
DSAStackTy &  DSA,
llvm::DenseMap< ValueDecl *, Expr *> &  VarsWithImplicitDSA,
OMPLoopDirective::HelperExprs Built 
)
static

Called on a for stmt to check itself and nested loops (if any).

Returns
Returns 0 if one of the collapsed stmts is not canonical for loop, number of collapsed loops otherwise.

Definition at line 4370 of file SemaOpenMP.cpp.

References clang::Sema::AA_Converting, clang::Sema::ActOnConditionalOp(), clang::Sema::ActOnFinishFullExpr(), clang::Sema::ActOnIntegerConstant(), clang::Sema::AddInitializerToDecl(), clang::Sema::BuildBinOp(), BuildCounterInit(), BuildCounterUpdate(), buildDeclRefExpr(), buildPreInits(), buildVarDecl(), clang::C, clang::OMPLoopDirective::HelperExprs::CalcLastIteration, CheckOpenMPIterationSpace(), clang::OMPLoopDirective::HelperExprs::clear(), clang::OMPLoopDirective::DistCombinedHelperExprs::Cond, clang::OMPLoopDirective::HelperExprs::Cond, clang::Sema::Context, clang::OMPLoopDirective::HelperExprs::Counters, clang::Sema::CurContext, clang::Sema::DefaultLvalueConversion(), clang::Sema::Diag(), clang::OMPLoopDirective::HelperExprs::DistCombinedFields, clang::OMPLoopDirective::HelperExprs::DistInc, clang::OMPLoopDirective::DistCombinedHelperExprs::EUB, clang::OMPLoopDirective::HelperExprs::EUB, clang::Expr::EvaluateAsInt(), clang::OMPLoopDirective::HelperExprs::Finals, FitsInto(), clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::Sema::getASTContext(), clang::Expr::getExprLoc(), clang::ASTContext::getIntTypeForBitwidth(), clang::Stmt::getSourceRange(), clang::Stmt::IgnoreContainers(), clang::OMPLoopDirective::HelperExprs::IL, clang::OMPLoopDirective::HelperExprs::Inc, clang::OMPLoopDirective::DistCombinedHelperExprs::Init, clang::OMPLoopDirective::HelperExprs::Init, clang::OMPLoopDirective::HelperExprs::Inits, clang::DeclContext::isDependentContext(), clang::isOpenMPDistributeDirective(), clang::isOpenMPLoopBoundSharingDirective(), clang::isOpenMPTaskLoopDirective(), clang::isOpenMPWorksharingDirective(), clang::ActionResult< PtrTy, CompressInvalid >::isUnset(), clang::ActionResult< PtrTy, CompressInvalid >::isUsable(), clang::OMPLoopDirective::HelperExprs::IterationVarRef, clang::OMPLoopDirective::HelperExprs::LastIteration, clang::OMPLoopDirective::DistCombinedHelperExprs::LB, clang::OMPLoopDirective::HelperExprs::LB, clang::OMPLoopDirective::DistCombinedHelperExprs::NLB, clang::OMPLoopDirective::HelperExprs::NLB, clang::OMPLoopDirective::DistCombinedHelperExprs::NUB, clang::OMPLoopDirective::HelperExprs::NUB, clang::OMPLoopDirective::HelperExprs::NumIterations, clang::Sema::PerformImplicitConversion(), clang::OMPLoopDirective::HelperExprs::PreCond, clang::OMPLoopDirective::HelperExprs::PreInits, clang::OMPLoopDirective::HelperExprs::PrevEUB, clang::OMPLoopDirective::HelperExprs::PrevLB, clang::OMPLoopDirective::HelperExprs::PrevUB, clang::OMPLoopDirective::HelperExprs::PrivateCounters, clang::Result, clang::OMPLoopDirective::HelperExprs::ST, clang::OMPLoopDirective::DistCombinedHelperExprs::UB, clang::OMPLoopDirective::HelperExprs::UB, clang::diff::Update, clang::OMPLoopDirective::HelperExprs::Updates, and WidenIterationCount().

Referenced by clang::Sema::ActOnOpenMPDistributeDirective(), clang::Sema::ActOnOpenMPDistributeParallelForDirective(), clang::Sema::ActOnOpenMPDistributeParallelForSimdDirective(), clang::Sema::ActOnOpenMPDistributeSimdDirective(), clang::Sema::ActOnOpenMPForDirective(), clang::Sema::ActOnOpenMPForSimdDirective(), clang::Sema::ActOnOpenMPParallelForDirective(), clang::Sema::ActOnOpenMPParallelForSimdDirective(), clang::Sema::ActOnOpenMPSimdDirective(), clang::Sema::ActOnOpenMPTargetParallelForDirective(), clang::Sema::ActOnOpenMPTargetParallelForSimdDirective(), clang::Sema::ActOnOpenMPTargetSimdDirective(), clang::Sema::ActOnOpenMPTargetTeamsDistributeDirective(), clang::Sema::ActOnOpenMPTargetTeamsDistributeParallelForDirective(), clang::Sema::ActOnOpenMPTargetTeamsDistributeParallelForSimdDirective(), clang::Sema::ActOnOpenMPTargetTeamsDistributeSimdDirective(), clang::Sema::ActOnOpenMPTaskLoopDirective(), clang::Sema::ActOnOpenMPTaskLoopSimdDirective(), clang::Sema::ActOnOpenMPTeamsDistributeDirective(), clang::Sema::ActOnOpenMPTeamsDistributeParallelForDirective(), clang::Sema::ActOnOpenMPTeamsDistributeParallelForSimdDirective(), and clang::Sema::ActOnOpenMPTeamsDistributeSimdDirective().

◆ checkReductionClauseWithNogroup()

static bool checkReductionClauseWithNogroup ( Sema S,
ArrayRef< OMPClause *>  Clauses 
)
static

◆ checkScheduleModifiers()

static bool checkScheduleModifiers ( Sema S,
OpenMPScheduleClauseModifier  M1,
OpenMPScheduleClauseModifier  M2,
SourceLocation  M1Loc,
SourceLocation  M2Loc 
)
static

◆ checkSimdlenSafelenSpecified()

static bool checkSimdlenSafelenSpecified ( Sema S,
const ArrayRef< OMPClause *>  Clauses 
)
static

◆ CheckTypeMappable()

static bool CheckTypeMappable ( SourceLocation  SL,
SourceRange  SR,
Sema SemaRef,
DSAStackTy *  Stack,
QualType  QTy 
)
static

Definition at line 10757 of file SemaOpenMP.cpp.

Referenced by checkMappableExpressionList(), and checkValueDeclInTarget().

◆ checkValueDeclInTarget()

static bool checkValueDeclInTarget ( SourceLocation  SL,
SourceRange  SR,
Sema SemaRef,
DSAStackTy *  Stack,
ValueDecl VD 
)
static

◆ filterLookupForUDR()

template<typename T >
static T filterLookupForUDR ( SmallVectorImpl< UnresolvedSet< 8 >> &  Lookups,
const llvm::function_ref< T(ValueDecl *)> &  Gen 
)
static

Definition at line 9176 of file SemaOpenMP.cpp.

References clang::T.

◆ FinishOpenMPLinearClause()

static bool FinishOpenMPLinearClause ( OMPLinearClause Clause,
DeclRefExpr IV,
Expr NumIterations,
Sema SemaRef,
Scope S,
DSAStackTy *  Stack 
)
static

◆ FitsInto()

static bool FitsInto ( unsigned  Bits,
bool  Signed,
Expr E,
Sema SemaRef 
)
static

Check if the given expression E is a constant integer that fits into Bits bits.

Definition at line 4314 of file SemaOpenMP.cpp.

References clang::Sema::Context, clang::Expr::isIntegerConstantExpr(), and clang::Result.

Referenced by CheckOpenMPLoop().

◆ getCanonicalDecl()

static ValueDecl* getCanonicalDecl ( ValueDecl D)
static

◆ getCollapseNumberExpr()

static Expr* getCollapseNumberExpr ( ArrayRef< OMPClause *>  Clauses)
static

◆ getExprAsWritten()

static Expr* getExprAsWritten ( Expr E)
static

Definition at line 565 of file SemaOpenMP.cpp.

Referenced by getCanonicalDecl().

◆ getListOfPossibleValues()

static std::string getListOfPossibleValues ( OpenMPClauseKind  K,
unsigned  First,
unsigned  Last,
ArrayRef< unsigned >  Exclude = llvm::None 
)
static

◆ getOpenMPCaptureRegionForClause()

static OpenMPDirectiveKind getOpenMPCaptureRegionForClause ( OpenMPDirectiveKind  DKind,
OpenMPClauseKind  CKind,
OpenMPDirectiveKind  NameModifier = OMPD_unknown 
)
static

◆ getOrderedNumberExpr()

static Expr* getOrderedNumberExpr ( ArrayRef< OMPClause *>  Clauses)
static

◆ getPrivateItem()

static std::pair<ValueDecl *, bool> getPrivateItem ( Sema S,
Expr *&  RefExpr,
SourceLocation ELoc,
SourceRange ERange,
bool  AllowArraySection = false 
)
static

◆ hasClauses() [1/2]

static bool hasClauses ( ArrayRef< OMPClause *>  Clauses,
const OpenMPClauseKind  K 
)
static

◆ hasClauses() [2/2]

template<typename... Params>
static bool hasClauses ( ArrayRef< OMPClause *>  Clauses,
const OpenMPClauseKind  K,
const Params...  ClauseTypes 
)
static

Definition at line 6350 of file SemaOpenMP.cpp.

References hasClauses().

◆ IsNonNegativeIntegerValue()

static bool IsNonNegativeIntegerValue ( Expr *&  ValExpr,
Sema SemaRef,
OpenMPClauseKind  CKind,
bool  StrictlyPositive 
)
static

◆ ReportOriginalDSA()

static void ReportOriginalDSA ( Sema SemaRef,
DSAStackTy *  Stack,
const ValueDecl D,
DSAStackTy::DSAVarData  DVar,
bool  IsLoopIterVar = false 
)
static

◆ WidenIterationCount()

static ExprResult WidenIterationCount ( unsigned  Bits,
Expr E,
Sema SemaRef 
)
static

Convert integer expression E to make it have at least Bits bits.

Definition at line 4298 of file SemaOpenMP.cpp.

References clang::Sema::AA_Converting, clang::C, clang::Sema::Context, clang::ExprError(), clang::Expr::getType(), and clang::Sema::PerformImplicitConversion().

Referenced by CheckOpenMPLoop().