clang 17.0.0git
|
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/OpenMPClause.h"
#include "clang/AST/StmtCXX.h"
#include "clang/AST/StmtOpenMP.h"
#include "clang/AST/StmtVisitor.h"
#include "clang/AST/TypeOrdering.h"
#include "clang/Basic/DiagnosticSema.h"
#include "clang/Basic/OpenMPKinds.h"
#include "clang/Basic/PartialDiagnostic.h"
#include "clang/Basic/TargetInfo.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/IndexedMap.h"
#include "llvm/ADT/PointerEmbeddedInt.h"
#include "llvm/ADT/STLExtras.h"
#include "llvm/ADT/SmallSet.h"
#include "llvm/ADT/StringExtras.h"
#include "llvm/Frontend/OpenMP/OMPAssume.h"
#include "llvm/Frontend/OpenMP/OMPConstants.h"
#include <optional>
#include <set>
Go to the source code of this file.
Classes | |
struct | Kind2Unsigned |
Macros | |
#define | DSAStack static_cast<DSAStackTy *>(VarDataSharingAttributesStack) |
Functions | |
static const Expr * | checkMapClauseExpressionBase (Sema &SemaRef, Expr *E, OMPClauseMappableExprCommon::MappableExprComponentList &CurComponents, OpenMPClauseKind CKind, OpenMPDirectiveKind DKind, bool NoDiagnose) |
Return the expression of the base of the mappable expression or null if it cannot be determined and do all the necessary checks to see if the expression is valid as a standalone mappable expression. | |
static const Expr * | getExprAsWritten (const Expr *E) |
static Expr * | getExprAsWritten (Expr *E) |
static const ValueDecl * | getCanonicalDecl (const ValueDecl *D) |
static ValueDecl * | getCanonicalDecl (ValueDecl *D) |
static VarDecl * | buildVarDecl (Sema &SemaRef, SourceLocation Loc, QualType Type, StringRef Name, const AttrVec *Attrs=nullptr, DeclRefExpr *OrigRef=nullptr) |
Build a variable declaration for OpenMP loop iteration variable. | |
static DeclRefExpr * | buildDeclRefExpr (Sema &S, VarDecl *D, QualType Ty, SourceLocation Loc, bool RefersToCapture=false) |
static bool | isConstNotMutableType (Sema &SemaRef, QualType Type, bool AcceptIfMutable=true, bool *IsClassType=nullptr) |
static bool | rejectConstNotMutableType (Sema &SemaRef, const ValueDecl *D, QualType Type, OpenMPClauseKind CKind, SourceLocation ELoc, bool AcceptIfMutable=true, bool ListItemNotVar=false) |
static bool | isOpenMPDeviceDelayedContext (Sema &S) |
static OpenMPDefaultmapClauseKind | getVariableCategoryFromDecl (const LangOptions &LO, const ValueDecl *VD) |
static OMPCapturedExprDecl * | buildCaptureDecl (Sema &S, IdentifierInfo *Id, Expr *CaptureExpr, bool WithInit, DeclContext *CurContext, bool AsExpression) |
static std::pair< ValueDecl *, bool > | getPrivateItem (Sema &S, Expr *&RefExpr, SourceLocation &ELoc, SourceRange &ERange, bool AllowArraySection=false, StringRef DiagType="") |
static void | checkReductionClauses (Sema &S, DSAStackTy *Stack, ArrayRef< OMPClause * > Clauses) |
Check consistency of the reduction clauses. | |
static void | checkAllocateClauses (Sema &S, DSAStackTy *Stack, ArrayRef< OMPClause * > Clauses) |
static DeclRefExpr * | buildCapture (Sema &S, ValueDecl *D, Expr *CaptureExpr, bool WithInit) |
static void | reportOriginalDsa (Sema &SemaRef, const DSAStackTy *Stack, const ValueDecl *D, const DSAStackTy::DSAVarData &DVar, bool IsLoopIterVar=false) |
static bool | FinishOpenMPLinearClause (OMPLinearClause &Clause, DeclRefExpr *IV, Expr *NumIterations, Sema &SemaRef, Scope *S, DSAStackTy *Stack) |
static OMPAllocateDeclAttr::AllocatorTypeTy | getAllocatorKind (Sema &S, DSAStackTy *Stack, Expr *Allocator) |
static bool | checkPreviousOMPAllocateAttribute (Sema &S, DSAStackTy *Stack, Expr *RefExpr, VarDecl *VD, OMPAllocateDeclAttr::AllocatorTypeTy AllocatorKind, Expr *Allocator) |
static void | applyOMPAllocateAttribute (Sema &S, VarDecl *VD, OMPAllocateDeclAttr::AllocatorTypeTy AllocatorKind, Expr *Allocator, Expr *Alignment, SourceRange SR) |
static OpenMPMapClauseKind | getMapClauseKindFromModifier (OpenMPDefaultmapClauseModifier M, bool IsAggregateOrDeclareTarget) |
static void | handleDeclareVariantConstructTrait (DSAStackTy *Stack, OpenMPDirectiveKind DKind, bool ScopeEntry) |
static ExprResult | buildCapture (Sema &S, Expr *CaptureExpr, DeclRefExpr *&Ref, StringRef Name) |
static bool | checkOrderedOrderSpecified (Sema &S, const ArrayRef< OMPClause * > Clauses) |
static bool | checkCancelRegion (Sema &SemaRef, OpenMPDirectiveKind CurrentRegion, OpenMPDirectiveKind CancelRegion, SourceLocation StartLoc) |
static bool | checkNestingOfRegions (Sema &SemaRef, const DSAStackTy *Stack, OpenMPDirectiveKind CurrentRegion, const DeclarationNameInfo &CurrentName, OpenMPDirectiveKind CancelRegion, OpenMPBindClauseKind BindKind, SourceLocation StartLoc) |
static bool | checkIfClauses (Sema &S, OpenMPDirectiveKind Kind, ArrayRef< OMPClause * > Clauses, ArrayRef< OpenMPDirectiveKind > AllowedNameModifiers) |
static VarDecl * | precomputeExpr (Sema &Actions, SmallVectorImpl< Stmt * > &BodyStmts, Expr *E, StringRef Name) |
static CapturedStmt * | buildDistanceFunc (Sema &Actions, QualType LogicalTy, BinaryOperator::Opcode Rel, Expr *StartExpr, Expr *StopExpr, Expr *StepExpr) |
Create a closure that computes the number of iterations of a loop. | |
static CapturedStmt * | buildLoopVarFunc (Sema &Actions, QualType LoopVarTy, QualType LogicalTy, DeclRefExpr *StartExpr, Expr *Step, bool Deref) |
Create a closure that computes the loop variable from the logical iteration number. | |
static ExprResult | buildUserDefinedMapperRef (Sema &SemaRef, Scope *S, CXXScopeSpec &MapperIdScopeSpec, const DeclarationNameInfo &MapperId, QualType Type, Expr *UnresolvedMapper) |
static void | processImplicitMapsWithDefaultMappers (Sema &S, DSAStackTy *Stack, SmallVectorImpl< OMPClause * > &Clauses) |
Perform DFS through the structure/class data members trying to find member(s) with user-defined 'default' mapper and generate implicit map clauses for such members with the found 'default' mapper. | |
static void | setPrototype (Sema &S, FunctionDecl *FD, FunctionDecl *FDWithProto, QualType NewType) |
static bool | checkOpenMPIterationSpace (OpenMPDirectiveKind DKind, Stmt *S, Sema &SemaRef, DSAStackTy &DSA, unsigned CurrentNestedLoopCount, unsigned NestedLoopCount, unsigned TotalNestedLoopCount, Expr *CollapseLoopCountExpr, Expr *OrderedLoopCountExpr, Sema::VarsWithInheritedDSAType &VarsWithImplicitDSA, llvm::MutableArrayRef< LoopIterationSpace > ResultIterSpaces, llvm::MapVector< const Expr *, DeclRefExpr * > &Captures) |
Called on a for stmt to check and extract its iteration space for further processing (such as collapsing). | |
static ExprResult | buildCounterInit (Sema &SemaRef, Scope *S, SourceLocation Loc, ExprResult VarRef, ExprResult Start, bool IsNonRectangularLB, llvm::MapVector< const Expr *, DeclRefExpr * > &Captures) |
Build 'VarRef = Start. | |
static ExprResult | buildCounterUpdate (Sema &SemaRef, Scope *S, SourceLocation Loc, ExprResult VarRef, ExprResult Start, ExprResult Iter, ExprResult Step, bool Subtract, bool IsNonRectangularLB, llvm::MapVector< const Expr *, DeclRefExpr * > *Captures=nullptr) |
Build 'VarRef = Start + Iter * Step'. | |
static ExprResult | widenIterationCount (unsigned Bits, Expr *E, Sema &SemaRef) |
Convert integer expression E to make it have at least Bits bits. | |
static bool | fitsInto (unsigned Bits, bool Signed, const Expr *E, Sema &SemaRef) |
Check if the given expression E is a constant integer that fits into Bits bits. | |
static Stmt * | buildPreInits (ASTContext &Context, MutableArrayRef< Decl * > PreInits) |
Build preinits statement for the given declarations. | |
static Stmt * | buildPreInits (ASTContext &Context, const llvm::MapVector< const Expr *, DeclRefExpr * > &Captures) |
Build preinits statement for the given declarations. | |
static Expr * | buildPostUpdate (Sema &S, ArrayRef< Expr * > PostUpdates) |
Build postupdate expression for the given list of postupdates expressions. | |
static unsigned | checkOpenMPLoop (OpenMPDirectiveKind DKind, Expr *CollapseLoopCountExpr, Expr *OrderedLoopCountExpr, Stmt *AStmt, Sema &SemaRef, DSAStackTy &DSA, Sema::VarsWithInheritedDSAType &VarsWithImplicitDSA, OMPLoopBasedDirective::HelperExprs &Built) |
Called on a for stmt to check itself and nested loops (if any). | |
static Expr * | getCollapseNumberExpr (ArrayRef< OMPClause * > Clauses) |
static Expr * | getOrderedNumberExpr (ArrayRef< OMPClause * > Clauses) |
static bool | checkSimdlenSafelenSpecified (Sema &S, const ArrayRef< OMPClause * > Clauses) |
static Expr * | getDirectCallExpr (Expr *E) |
static bool | checkGenericLoopLastprivate (Sema &S, ArrayRef< OMPClause * > Clauses, OpenMPDirectiveKind K, DSAStackTy *Stack) |
static bool | checkMutuallyExclusiveClauses (Sema &S, ArrayRef< OMPClause * > Clauses, ArrayRef< OpenMPClauseKind > MutuallyExclusiveClauses) |
Find and diagnose mutually exclusive clause kinds. | |
static bool | hasClauses (ArrayRef< OMPClause * > Clauses, const OpenMPClauseKind K) |
Check for existence of a map clause in the list of clauses. | |
template<typename... Params> | |
static bool | hasClauses (ArrayRef< OMPClause * > Clauses, const OpenMPClauseKind K, const Params... ClauseTypes) |
static bool | isClauseMappable (ArrayRef< OMPClause * > Clauses) |
Check if the variables in the mapping clause are externally visible. | |
static bool | checkReductionClauseWithNogroup (Sema &S, ArrayRef< OMPClause * > Clauses) |
static OpenMPDirectiveKind | getOpenMPCaptureRegionForClause (OpenMPDirectiveKind DKind, OpenMPClauseKind CKind, unsigned OpenMPVersion, OpenMPDirectiveKind NameModifier=OMPD_unknown) |
static bool | isNonNegativeIntegerValue (Expr *&ValExpr, Sema &SemaRef, OpenMPClauseKind CKind, bool StrictlyPositive, bool BuildCapture=false, OpenMPDirectiveKind DKind=OMPD_unknown, OpenMPDirectiveKind *CaptureRegion=nullptr, Stmt **HelperValStmt=nullptr) |
static bool | findOMPAllocatorHandleT (Sema &S, SourceLocation Loc, DSAStackTy *Stack) |
Tries to find omp_allocator_handle_t type. | |
static std::string | getListOfPossibleValues (OpenMPClauseKind K, unsigned First, unsigned Last, ArrayRef< unsigned > Exclude=std::nullopt) |
static bool | checkScheduleModifiers (Sema &S, OpenMPScheduleClauseModifier M1, OpenMPScheduleClauseModifier M2, SourceLocation M1Loc, SourceLocation M2Loc) |
static bool | isValidInteropVariable (Sema &SemaRef, Expr *InteropVarExpr, SourceLocation VarLoc, OpenMPClauseKind Kind) |
template<typename T , typename U > | |
static T | filterLookupForUDReductionAndMapper (SmallVectorImpl< U > &Lookups, const llvm::function_ref< T(ValueDecl *)> Gen) |
static NamedDecl * | findAcceptableDecl (Sema &SemaRef, NamedDecl *D) |
static void | argumentDependentLookup (Sema &SemaRef, const DeclarationNameInfo &Id, SourceLocation Loc, QualType Ty, SmallVectorImpl< UnresolvedSet< 8 > > &Lookups) |
static ExprResult | buildDeclareReductionRef (Sema &SemaRef, SourceLocation Loc, SourceRange Range, Scope *S, CXXScopeSpec &ReductionIdScopeSpec, const DeclarationNameInfo &ReductionId, QualType Ty, CXXCastPath &BasePath, Expr *UnresolvedReduction) |
static bool | checkOMPArraySectionConstantForReduction (ASTContext &Context, const OMPArraySectionExpr *OASE, bool &SingleElement, SmallVectorImpl< llvm::APSInt > &ArraySizes) |
static BinaryOperatorKind | getRelatedCompoundReductionOp (BinaryOperatorKind BOK) |
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 | findOMPDependT (Sema &S, SourceLocation Loc, DSAStackTy *Stack, bool Diagnose=true) |
Tries to find omp_depend_t. type. | |
static bool | checkTypeMappable (SourceLocation SL, SourceRange SR, Sema &SemaRef, DSAStackTy *Stack, QualType QTy, bool FullCheck=true) |
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. | |
static bool | checkArrayExpressionDoesNotReferToUnitySize (Sema &SemaRef, const Expr *E, QualType BaseQTy) |
static bool | checkMapConflicts (Sema &SemaRef, DSAStackTy *DSAS, const ValueDecl *VD, const Expr *E, bool CurrentRegionOnly, OMPClauseMappableExprCommon::MappableExprComponentListRef CurComponents, OpenMPClauseKind CKind) |
static void | checkMappableExpressionList (Sema &SemaRef, DSAStackTy *DSAS, OpenMPClauseKind CKind, MappableVarListInfo &MVLI, SourceLocation StartLoc, CXXScopeSpec &MapperIdScopeSpec, DeclarationNameInfo MapperId, ArrayRef< Expr * > UnresolvedMappers, OpenMPMapClauseKind MapType=OMPC_MAP_unknown, ArrayRef< OpenMPMapModifierKind > Modifiers=std::nullopt, bool IsMapTypeImplicit=false, bool NoDiagnose=false) |
static bool | findOMPEventHandleT (Sema &S, SourceLocation Loc, DSAStackTy *Stack) |
Tries to find omp_event_handle_t type. | |
static void | checkDeclInTargetContext (SourceLocation SL, SourceRange SR, Sema &SemaRef, Decl *D) |
static bool | checkValueDeclInTarget (SourceLocation SL, SourceRange SR, Sema &SemaRef, DSAStackTy *Stack, ValueDecl *VD) |
static bool | findOMPAlloctraitT (Sema &S, SourceLocation Loc, DSAStackTy *Stack) |
Tries to find omp_alloctrait_t type. | |
This file implements semantic analysis for OpenMP directives and clauses.
Definition in file SemaOpenMP.cpp.
#define DSAStack static_cast<DSAStackTy *>(VarDataSharingAttributesStack) |
Definition at line 2005 of file SemaOpenMP.cpp.
|
static |
Definition at line 19092 of file SemaOpenMP.cpp.
References clang::Sema::ActOnFinishFullExpr(), clang::Sema::ActOnIntegerConstant(), clang::Sema::ActOnUninitializedDecl(), clang::Sema::AddInitializerToDecl(), clang::Sema::BuildBinOp(), buildCapture(), clang::Sema::BuildCStyleCastExpr(), buildDeclareReductionRef(), buildDeclRefExpr(), buildVarDecl(), clang::VarDecl::CallInit, checkOMPArraySectionConstantForReduction(), clang::Sema::Context, clang::FloatingLiteral::Create(), clang::IntegerLiteral::Create(), clang::ImplicitCastExpr::Create(), clang::CallExpr::Create(), clang::Sema::CreateBuiltinArraySubscriptExpr(), clang::Sema::CreateBuiltinBinOp(), clang::Sema::CreateBuiltinUnaryOp(), clang::Sema::CurContext, clang::Sema::CurFPFeatureOverrides(), clang::VarDecl::DeclarationOnly, clang::Sema::DefaultFunctionArrayLvalueConversion(), clang::Sema::DefaultLvalueConversion(), clang::ASTContext::DependentTy, clang::Sema::Diag(), clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::ActionResult< PtrTy, CompressInvalid >::getAs(), clang::Type::getAs(), clang::ASTContext::getAsArrayType(), clang::Type::getAsArrayTypeUnsafe(), clang::DeclarationName::getAsIdentifierInfo(), clang::Decl::getAttrs(), clang::ASTContext::getBaseElementType(), clang::OMPArraySectionExpr::getBaseOriginalType(), clang::SourceRange::getBegin(), clang::DeclarationNameInfo::getBeginLoc(), clang::CXXScopeSpec::getBeginLoc(), clang::ASTContext::getConstantArrayType(), clang::DeclarationName::getCXXOverloadedOperator(), clang::DeclRefExpr::getDecl(), clang::DeclarationNameInfo::getEndLoc(), clang::ASTContext::getFloatTypeSemantics(), clang::ASTContext::getFunctionType(), clang::VarDecl::getInit(), clang::VarDecl::getInitStyle(), clang::ASTContext::getIntTypeForBitwidth(), clang::Sema::getLangOpts(), clang::Decl::getLocation(), clang::NamedDecl::getName(), clang::DeclarationNameInfo::getName(), clang::QualType::getNonReferenceType(), clang::Type::getPointeeType(), clang::ASTContext::getPointerType(), getPrivateItem(), getRelatedCompoundReductionOp(), clang::ASTContext::getSizeType(), clang::ASTContext::getTargetInfo(), clang::ASTContext::getTrivialTypeSourceInfo(), clang::ValueDecl::getType(), clang::Expr::getType(), clang::ASTContext::getTypeSize(), clang::Expr::getValueKind(), clang::ASTContext::getVariableArrayType(), clang::Decl::hasAttr(), clang::Decl::hasAttrs(), clang::VarDecl::hasInit(), clang::Type::hasSignedIntegerRepresentation(), clang::Sema::IgnoredValueConversions(), clang::Expr::IgnoreParens(), clang::Type::isAnyComplexType(), clang::Type::isArithmeticType(), clang::DeclContext::isDependentContext(), clang::Type::isFloatingType(), clang::Type::isIntegerType(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), clang::Decl::isInvalidDecl(), clang::Sema::isOpenMPCapturedDecl(), clang::isOpenMPParallelDirective(), clang::isOpenMPSimdDirective(), clang::isOpenMPTargetExecutionDirective(), clang::isOpenMPTaskingDirective(), clang::isOpenMPTeamsDirective(), clang::isOpenMPWorksharingDirective(), clang::Type::isPointerType(), clang::Type::isRealFloatingType(), clang::Type::isRecordType(), clang::Type::isReferenceType(), clang::Type::isScalarType(), clang::ActionResult< PtrTy, CompressInvalid >::isUnset(), clang::ActionResult< PtrTy, CompressInvalid >::isUsable(), clang::CXXScopeSpec::isValid(), clang::Type::isVariablyModifiedType(), clang::TargetInfo::isVLASupported(), clang::ArrayType::Normal, clang::NUM_OVERLOADED_OPERATORS, clang::OK_Ordinary, clang::OO_None, clang::Stmt::Profile(), rejectConstNotMutableType(), reportOriginalDsa(), clang::Sema::RequireCompleteType(), clang::SourceRange::setBegin(), clang::SourceRange::setEnd(), clang::VarDecl::setInit(), clang::VarDecl::setInitStyle(), clang::Sema::targetDiag(), clang::VK_LValue, clang::VK_PRValue, and clang::ASTContext::VoidTy.
Referenced by clang::Sema::ActOnOpenMPInReductionClause(), clang::Sema::ActOnOpenMPReductionClause(), and clang::Sema::ActOnOpenMPTaskReductionClause().
|
static |
Definition at line 3354 of file SemaOpenMP.cpp.
References clang::Decl::addAttr(), clang::Expr::containsUnexpandedParameterPack(), clang::Sema::Context, clang::ASTContext::getASTMutationListener(), clang::Decl::hasAttr(), clang::Expr::isInstantiationDependent(), clang::Expr::isTypeDependent(), and clang::Expr::isValueDependent().
Referenced by clang::Sema::ActOnOpenMPAllocateDirective(), and checkAllocateClauses().
|
static |
Definition at line 18742 of file SemaOpenMP.cpp.
References findAcceptableDecl(), clang::Sema::FindAssociatedClassesAndNamespaces(), Id, clang::Sema::isVisible(), and clang::VK_LValue.
Referenced by buildDeclareReductionRef(), and buildUserDefinedMapperRef().
|
static |
Definition at line 4674 of file SemaOpenMP.cpp.
References buildCaptureDecl(), buildDeclRefExpr(), clang::Sema::CreateBuiltinUnaryOp(), clang::Sema::CurContext, clang::Sema::DefaultLvalueConversion(), clang::ExprError(), clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::IdentifierTable::get(), clang::Sema::getASTContext(), clang::Expr::getExprLoc(), clang::Sema::getLangOpts(), clang::QualType::getNonReferenceType(), clang::Expr::getObjectKind(), clang::ValueDecl::getType(), clang::Expr::getType(), clang::ASTContext::Idents, clang::Expr::isGLValue(), clang::Type::isPointerType(), clang::ActionResult< PtrTy, CompressInvalid >::isUsable(), and clang::OK_Ordinary.
|
static |
Definition at line 4661 of file SemaOpenMP.cpp.
References buildCaptureDecl(), buildDeclRefExpr(), clang::Sema::CurContext, clang::Expr::getExprLoc(), clang::NamedDecl::getIdentifier(), clang::QualType::getNonReferenceType(), clang::ValueDecl::getType(), and clang::Sema::isOpenMPCapturedDecl().
Referenced by actOnOMPReductionKindClause(), clang::Sema::ActOnOpenMPAlignedClause(), clang::Sema::ActOnOpenMPAllocateClause(), clang::Sema::ActOnOpenMPCopyprivateClause(), clang::Sema::ActOnOpenMPFirstprivateClause(), clang::Sema::ActOnOpenMPHasDeviceAddrClause(), clang::Sema::ActOnOpenMPLastprivateClause(), clang::Sema::ActOnOpenMPLinearClause(), clang::Sema::ActOnOpenMPLoopInitialization(), clang::Sema::ActOnOpenMPPrivateClause(), clang::Sema::ActOnOpenMPSharedClause(), clang::Sema::ActOnOpenMPUseDeviceAddrClause(), and clang::Sema::ActOnOpenMPUseDevicePtrClause().
|
static |
Definition at line 4630 of file SemaOpenMP.cpp.
References clang::DeclContext::addHiddenDecl(), clang::Sema::AddInitializerToDecl(), clang::C, clang::OMPCapturedExprDecl::Create(), clang::Sema::CreateBuiltinUnaryOp(), clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::Sema::getASTContext(), clang::Stmt::getBeginLoc(), clang::Expr::getExprLoc(), clang::Sema::getLangOpts(), clang::Expr::getObjectKind(), Id, clang::Expr::IgnoreImpCasts(), clang::Expr::isGLValue(), clang::ActionResult< PtrTy, CompressInvalid >::isUsable(), and clang::OK_Ordinary.
Referenced by buildCapture(), and clang::Sema::isOpenMPCapturedDecl().
|
static |
Build 'VarRef = Start.
Definition at line 9370 of file SemaOpenMP.cpp.
References clang::Sema::AA_Converting, clang::Sema::BuildBinOp(), clang::Sema::Context, clang::ExprError(), clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::Expr::getType(), clang::ASTContext::hasSameType(), clang::ActionResult< PtrTy, CompressInvalid >::isUsable(), and clang::Sema::PerformImplicitConversion().
Referenced by checkOpenMPLoop().
|
static |
Build 'VarRef = Start + Iter * Step'.
Definition at line 9394 of file SemaOpenMP.cpp.
References clang::Sema::AA_Converting, clang::Sema::ActOnParenExpr(), clang::Sema::BuildBinOp(), clang::Sema::Context, clang::Sema::CreateBuiltinBinOp(), clang::ExprError(), clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::Expr::getType(), clang::ASTContext::hasSameType(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), clang::Type::isOverloadableType(), clang::ActionResult< PtrTy, CompressInvalid >::isUsable(), and clang::Sema::PerformImplicitConversion().
Referenced by checkOpenMPLoop(), and FinishOpenMPLinearClause().
|
static |
Definition at line 18800 of file SemaOpenMP.cpp.
References clang::UnresolvedSetImpl::addDecl(), clang::UnresolvedSetImpl::append(), clang::Sema::AR_inaccessible, argumentDependentLookup(), clang::UnresolvedSetImpl::begin(), clang::LookupResult::begin(), clang::Sema::BuildBasePathArray(), clang::Sema::BuildDeclRefExpr(), clang::Sema::CheckBaseClassAccess(), clang::LookupResult::clear(), clang::Type::containsUnexpandedParameterPack(), clang::Sema::Context, clang::UnresolvedLookupExpr::Create(), clang::Sema::CurContext, clang::Sema::Diag(), clang::LookupResult::empty(), clang::UnresolvedSetImpl::end(), clang::LookupResult::end(), clang::ExprEmpty(), clang::ExprError(), clang::Type::getAs(), clang::ASTContext::getCanonicalType(), clang::Sema::getLangOpts(), clang::QualType::getNonReferenceType(), clang::LookupResult::getRepresentativeDecl(), clang::ValueDecl::getType(), clang::QualType::getUnqualifiedType(), clang::CXXScopeSpec::getWithLocInContext(), clang::ASTContext::hasSameType(), clang::Sema::isCompleteType(), clang::DeclContext::isDependentContext(), clang::Type::isDependentType(), clang::Sema::IsDerivedFrom(), clang::Type::isInstantiationDependentType(), clang::CXXScopeSpec::isInvalid(), clang::Decl::isInvalidDecl(), clang::QualType::isMoreQualifiedThan(), clang::CXXScopeSpec::isSet(), clang::Sema::LookupOMPReductionName, clang::Sema::LookupParsedName(), clang::Sema::LookupQualifiedName(), clang::LookupResult::suppressDiagnostics(), and clang::VK_LValue.
Referenced by actOnOMPReductionKindClause().
|
static |
Definition at line 1549 of file SemaOpenMP.cpp.
References clang::Sema::Context, clang::DeclRefExpr::Create(), clang::Sema::getASTContext(), clang::Decl::markUsed(), clang::Decl::setReferenced(), and clang::VK_LValue.
Referenced by actOnOMPReductionKindClause(), clang::Sema::ActOnOpenMPCopyinClause(), clang::Sema::ActOnOpenMPCopyprivateClause(), clang::Sema::ActOnOpenMPDeclareMapperDirectiveVarDecl(), clang::Sema::ActOnOpenMPDeclareReductionCombinerStart(), clang::Sema::ActOnOpenMPDeclareReductionInitializerStart(), clang::Sema::ActOnOpenMPFirstprivateClause(), clang::Sema::ActOnOpenMPLastprivateClause(), clang::Sema::ActOnOpenMPLinearClause(), clang::Sema::ActOnOpenMPLoopInitialization(), clang::Sema::ActOnOpenMPPrivateClause(), clang::Sema::ActOnOpenMPTileDirective(), clang::Sema::ActOnOpenMPUnrollDirective(), clang::Sema::ActOnOpenMPUseDevicePtrClause(), buildCapture(), buildDistanceFunc(), checkOpenMPLoop(), clang::Sema::EndOpenMPDSABlock(), FinishOpenMPLinearClause(), and clang::Sema::isOpenMPCapturedDecl().
|
static |
Create a closure that computes the number of iterations of a loop.
Actions | The Sema object. |
LogicalTy | Type for the logical iteration number. |
Rel | Comparison operator of the loop condition. |
StartExpr | Value of the loop counter at the first iteration. |
StopExpr | Expression the loop counter is compared against in the loop condition. |
StepExpr | Amount of increment after each iteration. |
Definition at line 5598 of file SemaOpenMP.cpp.
References clang::Sema::ActOnCapturedRegionEnd(), clang::Sema::ActOnCapturedRegionStart(), clang::Sema::ActOnCompoundStmt(), clang::Sema::ActOnConditionalOp(), clang::AssertSuccess(), clang::Sema::BuildBinOp(), clang::Sema::BuildCStyleCastExpr(), buildDeclRefExpr(), clang::Sema::BuildDeclRefExpr(), clang::Sema::BuildUnaryOp(), clang::CR_Default, clang::IntegerLiteral::Create(), clang::Sema::CurContext, clang::Sema::getASTContext(), clang::Sema::getCurScope(), clang::ASTContext::getIntWidth(), clang::ASTContext::getLValueReferenceType(), clang::CapturedDecl::getParam(), clang::ASTContext::getTrivialTypeSourceInfo(), clang::ValueDecl::getType(), precomputeExpr(), and clang::VK_LValue.
Referenced by clang::Sema::ActOnOpenMPCanonicalLoop().
|
static |
Create a closure that computes the loop variable from the logical iteration number.
Actions | The Sema object. |
LoopVarTy | Type for the loop variable used for result value. |
LogicalTy | Type for the logical iteration number. |
StartExpr | Value of the loop counter at the first iteration. |
Step | Amount of increment after each iteration. |
Deref | Whether the loop variable is a dereference of the loop counter variable. |
Definition at line 5745 of file SemaOpenMP.cpp.
References clang::Sema::ActOnCapturedRegionEnd(), clang::Sema::ActOnCapturedRegionStart(), clang::AssertSuccess(), clang::Sema::BuildBinOp(), clang::Sema::BuildDeclRefExpr(), clang::Sema::BuildUnaryOp(), clang::CR_Default, clang::Sema::CurContext, clang::Sema::getASTContext(), clang::Sema::getCurScope(), clang::DeclRefExpr::getDecl(), clang::ASTContext::getLValueReferenceType(), clang::Invalid, clang::Sema::TryCapture_ExplicitByVal, clang::Sema::tryCaptureVariable(), and clang::VK_LValue.
Referenced by clang::Sema::ActOnOpenMPCanonicalLoop().
Build postupdate expression for the given list of postupdates expressions.
Definition at line 9520 of file SemaOpenMP.cpp.
References clang::Sema::BuildCStyleCastExpr(), clang::Sema::Context, clang::Sema::CreateBuiltinBinOp(), clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::Expr::getExprLoc(), clang::ASTContext::getTrivialTypeSourceInfo(), and clang::ASTContext::VoidTy.
Referenced by clang::Sema::ActOnOpenMPInReductionClause(), clang::Sema::ActOnOpenMPLastprivateClause(), clang::Sema::ActOnOpenMPLinearClause(), clang::Sema::ActOnOpenMPReductionClause(), and clang::Sema::ActOnOpenMPTaskReductionClause().
|
static |
Build preinits statement for the given declarations.
Definition at line 9508 of file SemaOpenMP.cpp.
References buildPreInits().
|
static |
Build preinits statement for the given declarations.
Definition at line 9496 of file SemaOpenMP.cpp.
References clang::DeclGroupRef::Create().
Referenced by clang::Sema::ActOnOpenMPDeviceClause(), clang::Sema::ActOnOpenMPDistScheduleClause(), clang::Sema::ActOnOpenMPFilterClause(), clang::Sema::ActOnOpenMPFinalClause(), clang::Sema::ActOnOpenMPFirstprivateClause(), clang::Sema::ActOnOpenMPIfClause(), clang::Sema::ActOnOpenMPInReductionClause(), clang::Sema::ActOnOpenMPLastprivateClause(), clang::Sema::ActOnOpenMPLinearClause(), clang::Sema::ActOnOpenMPNocontextClause(), clang::Sema::ActOnOpenMPNovariantsClause(), clang::Sema::ActOnOpenMPNumTeamsClause(), clang::Sema::ActOnOpenMPNumThreadsClause(), clang::Sema::ActOnOpenMPReductionClause(), clang::Sema::ActOnOpenMPScheduleClause(), clang::Sema::ActOnOpenMPTaskReductionClause(), clang::Sema::ActOnOpenMPThreadLimitClause(), clang::Sema::ActOnOpenMPTileDirective(), clang::Sema::ActOnOpenMPUnrollDirective(), clang::Sema::ActOnOpenMPXDynCGroupMemClause(), buildPreInits(), checkOpenMPLoop(), and isNonNegativeIntegerValue().
|
static |
Definition at line 21568 of file SemaOpenMP.cpp.
References clang::UnresolvedSetImpl::append(), clang::Sema::AR_inaccessible, argumentDependentLookup(), clang::UnresolvedSetImpl::begin(), clang::LookupResult::begin(), clang::Sema::BuildDeclRefExpr(), clang::Sema::CheckBaseClassAccess(), clang::LookupResult::clear(), clang::Type::containsUnexpandedParameterPack(), clang::Sema::Context, clang::UnresolvedLookupExpr::Create(), clang::Sema::CurContext, clang::Sema::Diag(), clang::UnresolvedSetImpl::end(), clang::LookupResult::end(), clang::ExprEmpty(), clang::ExprError(), clang::Type::getAsArrayTypeUnsafe(), clang::DeclarationNameInfo::getAsString(), clang::QualType::getCanonicalType(), clang::ASTContext::getCanonicalType(), clang::ArrayType::getElementType(), clang::Sema::getLangOpts(), clang::DeclarationNameInfo::getLoc(), clang::DeclarationNameInfo::getName(), clang::LookupResult::getRepresentativeDecl(), clang::ValueDecl::getType(), clang::QualType::getUnqualifiedType(), clang::CXXScopeSpec::getWithLocInContext(), clang::ASTContext::hasSameType(), clang::Type::isArrayType(), clang::DeclContext::isDependentContext(), clang::Type::isDependentType(), clang::Sema::IsDerivedFrom(), clang::Type::isInstantiationDependentType(), clang::CXXScopeSpec::isInvalid(), clang::Decl::isInvalidDecl(), clang::CXXScopeSpec::isSet(), clang::Type::isStructureOrClassType(), clang::Type::isUnionType(), clang::Sema::LookupOMPMapperName, clang::Sema::LookupParsedName(), clang::LookupResult::suppressDiagnostics(), and clang::VK_LValue.
Referenced by checkMappableExpressionList(), and processImplicitMapsWithDefaultMappers().
|
static |
Build a variable declaration for OpenMP loop iteration variable.
Definition at line 1528 of file SemaOpenMP.cpp.
References clang::Decl::addAttr(), clang::Sema::Context, clang::VarDecl::Create(), clang::Sema::CurContext, clang::IdentifierTable::get(), clang::Preprocessor::getIdentifierTable(), clang::ASTContext::getTrivialTypeSourceInfo(), clang::Sema::PP, clang::SC_None, and clang::Decl::setImplicit().
|
static |
Definition at line 5439 of file SemaOpenMP.cpp.
References applyOMPAllocateAttribute(), clang::C, checkPreviousOMPAllocateAttribute(), clang::OMPAllocateClause::classof(), clang::Sema::CurContext, Data, clang::Sema::Diag(), getAllocatorKind(), clang::Expr::getExprLoc(), clang::Sema::getLangOpts(), getPrivateItem(), clang::Stmt::getSourceRange(), clang::DeclContext::isDependentContext(), clang::isOpenMPPrivate(), clang::isOpenMPTargetExecutionDirective(), and clang::isOpenMPTaskingDirective().
Referenced by clang::Sema::EndOpenMPDSABlock().
|
static |
Definition at line 20906 of file SemaOpenMP.cpp.
References clang::Expr::EvaluateAsInt(), clang::Sema::getASTContext(), clang::QualType::getTypePtr(), and clang::Result.
|
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 20848 of file SemaOpenMP.cpp.
References clang::Expr::EvaluateAsInt(), clang::Sema::getASTContext(), clang::QualType::getTypePtr(), clang::Type::isPointerType(), and clang::Result.
Referenced by checkMapConflicts().
|
static |
Definition at line 4969 of file SemaOpenMP.cpp.
References clang::Sema::Diag().
Referenced by clang::Sema::ActOnOpenMPExecutableDirective().
|
static |
Definition at line 22969 of file SemaOpenMP.cpp.
References clang::Sema::Diag(), clang::Sema::getCurBlock(), clang::Sema::getCurCapturedRegion(), clang::Sema::getCurLambda(), clang::Decl::getLocation(), and clang::Sema::LangOpts.
Referenced by clang::Sema::checkDeclIsAllowedInOpenMPTarget().
|
static |
Definition at line 10516 of file SemaOpenMP.cpp.
References clang::C, clang::Sema::Diag(), and getPrivateItem().
Referenced by clang::Sema::ActOnOpenMPGenericLoopDirective(), clang::Sema::ActOnOpenMPParallelGenericLoopDirective(), clang::Sema::ActOnOpenMPTargetParallelGenericLoopDirective(), clang::Sema::ActOnOpenMPTargetTeamsGenericLoopDirective(), and clang::Sema::ActOnOpenMPTeamsGenericLoopDirective().
|
static |
Definition at line 5273 of file SemaOpenMP.cpp.
References clang::C, and clang::Sema::Diag().
Referenced by clang::Sema::ActOnOpenMPExecutableDirective().
|
static |
Return the expression of the base of the mappable expression or null if it cannot be determined and do all the necessary checks to see if the expression is valid as a standalone mappable expression.
In the process, record all the components of the expression.
Definition at line 21288 of file SemaOpenMP.cpp.
References clang::Sema::Diag(), clang::Expr::getExprLoc(), clang::Sema::getLangOpts(), clang::OMPArraySectionExpr::getLength(), clang::Stmt::getSourceRange(), and clang::Expr::IgnoreParens().
Referenced by checkMappableExpressionList().
|
static |
Definition at line 21320 of file SemaOpenMP.cpp.
References Begin, checkArrayExpressionDoesNotReferToWholeSize(), clang::Sema::Diag(), clang::for(), clang::Expr::getExprLoc(), clang::QualType::getNonReferenceType(), clang::Stmt::getSourceRange(), clang::if(), clang::Type::isAnyPointerType(), and clang::Sema::LangOpts.
Referenced by checkMappableExpressionList().
|
static |
Definition at line 21708 of file SemaOpenMP.cpp.
References buildUserDefinedMapperRef(), checkMapClauseExpressionBase(), checkMapConflicts(), checkTypeMappable(), clang::Expr::containsUnexpandedParameterPack(), clang::ASTContext::DeclarationNames, clang::Sema::Diag(), clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::IdentifierTable::get(), clang::Type::getAsArrayTypeUnsafe(), clang::OMPClauseMappableExprCommon::MappableComponent::getAssociatedDeclaration(), clang::Sema::getASTContext(), clang::OMPArraySectionExpr::getBase(), clang::OMPArraySectionExpr::getBaseOriginalType(), clang::QualType::getCanonicalType(), clang::Sema::getCurScope(), clang::Expr::getExprLoc(), clang::Sema::getLangOpts(), clang::DeclarationNameInfo::getName(), clang::getOpenMPSimpleClauseTypeName(), clang::Type::getPointeeType(), clang::Stmt::getSourceRange(), clang::Expr::getType(), clang::ASTContext::Idents, clang::Expr::IgnoreParenCasts(), clang::Expr::IgnoreParenLValueCasts(), clang::Expr::IgnoreParens(), clang::Decl::isCanonicalDecl(), clang::DeclarationName::isEmpty(), clang::Expr::isInstantiationDependent(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), clang::Expr::isLValue(), clang::isOpenMPPrivate(), clang::isOpenMPTargetExecutionDirective(), clang::Expr::isTypeDependent(), clang::SourceLocation::isValid(), clang::Expr::isValueDependent(), clang::Sema::LangOpts, reportOriginalDsa(), clang::DeclarationNameInfo::setLoc(), and clang::DeclarationNameInfo::setName().
Referenced by clang::Sema::ActOnOpenMPFromClause(), clang::Sema::ActOnOpenMPMapClause(), and clang::Sema::ActOnOpenMPToClause().
|
static |
Find and diagnose mutually exclusive clause kinds.
Definition at line 11057 of file SemaOpenMP.cpp.
References clang::C, clang::Sema::Diag(), clang::OMPClause::getBeginLoc(), and clang::OMPClause::getClauseKind().
Referenced by clang::Sema::ActOnOpenMPMaskedTaskLoopDirective(), clang::Sema::ActOnOpenMPMaskedTaskLoopSimdDirective(), clang::Sema::ActOnOpenMPMasterTaskLoopDirective(), clang::Sema::ActOnOpenMPMasterTaskLoopSimdDirective(), clang::Sema::ActOnOpenMPParallelMaskedTaskLoopDirective(), clang::Sema::ActOnOpenMPParallelMaskedTaskLoopSimdDirective(), clang::Sema::ActOnOpenMPParallelMasterTaskLoopDirective(), clang::Sema::ActOnOpenMPParallelMasterTaskLoopSimdDirective(), clang::Sema::ActOnOpenMPTaskDirective(), clang::Sema::ActOnOpenMPTaskLoopDirective(), clang::Sema::ActOnOpenMPTaskLoopSimdDirective(), and clang::Sema::ActOnOpenMPUnrollDirective().
|
static |
Definition at line 4985 of file SemaOpenMP.cpp.
References clang::Sema::Diag(), clang::Sema::getLangOpts(), clang::DeclarationNameInfo::getName(), clang::isOpenMPCombinedParallelADirective(), clang::isOpenMPDistributeDirective(), clang::isOpenMPGenericLoopDirective(), clang::isOpenMPNestingDistributeDirective(), clang::isOpenMPNestingTeamsDirective(), clang::isOpenMPParallelDirective(), clang::isOpenMPSimdDirective(), clang::isOpenMPTargetDataManagementDirective(), clang::isOpenMPTargetExecutionDirective(), clang::isOpenMPTaskingDirective(), clang::isOpenMPTeamsDirective(), clang::isOpenMPWorksharingDirective(), clang::SourceLocation::isValid(), and clang::Sema::LangOpts.
Referenced by clang::Sema::ActOnOpenMPExecutableDirective().
|
static |
Definition at line 19011 of file SemaOpenMP.cpp.
References clang::Expr::EvaluateAsInt(), clang::OMPArraySectionExpr::getBase(), clang::OMPArraySectionExpr::getColonLocFirst(), clang::OMPArraySectionExpr::getLength(), clang::Expr::IgnoreParenImpCasts(), clang::SourceLocation::isValid(), and clang::Result.
Referenced by actOnOMPReductionKindClause().
|
static |
Called on a for stmt to check and extract its iteration space for further processing (such as collapsing).
Definition at line 9187 of file SemaOpenMP.cpp.
References clang::Sema::CurContext, clang::Sema::Diag(), clang::Expr::getExprLoc(), clang::Sema::getLangOpts(), clang::QualType::getNonReferenceType(), clang::Stmt::getSourceRange(), clang::ValueDecl::getType(), clang::DeclContext::isDependentContext(), clang::Type::isDependentType(), clang::Type::isIntegerType(), clang::isOpenMPDistributeDirective(), clang::isOpenMPGenericLoopDirective(), clang::isOpenMPLoopDirective(), clang::isOpenMPLoopTransformationDirective(), clang::isOpenMPTaskLoopDirective(), clang::isOpenMPWorksharingDirective(), clang::Type::isOverloadableType(), clang::Type::isPointerType(), and clang::Sema::LangOpts.
Referenced by checkOpenMPLoop().
|
static |
Called on a for stmt to check itself and nested loops (if any).
Definition at line 9543 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(), clang::Sema::BuildCStyleCastExpr(), buildDeclRefExpr(), buildPreInits(), buildVarDecl(), clang::C, clang::OMPLoopBasedDirective::HelperExprs::CalcLastIteration, checkOpenMPIterationSpace(), clang::OMPLoopBasedDirective::HelperExprs::clear(), clang::OMPLoopBasedDirective::DistCombinedHelperExprs::Cond, clang::OMPLoopBasedDirective::HelperExprs::Cond, clang::Sema::Context, clang::OMPLoopBasedDirective::HelperExprs::Counters, clang::Sema::CurContext, clang::OMPLoopBasedDirective::HelperExprs::DependentCounters, clang::OMPLoopBasedDirective::HelperExprs::DependentInits, clang::Sema::Diag(), clang::OMPLoopBasedDirective::HelperExprs::DistCombinedFields, clang::OMPLoopBasedDirective::DistCombinedHelperExprs::DistCond, clang::OMPLoopBasedDirective::HelperExprs::DistInc, clang::OMPLoopBasedDirective::doForAllLoops(), clang::OMPLoopBasedDirective::DistCombinedHelperExprs::EUB, clang::OMPLoopBasedDirective::HelperExprs::EUB, clang::Expr::EvaluateAsInt(), clang::OMPLoopBasedDirective::HelperExprs::Finals, clang::OMPLoopBasedDirective::HelperExprs::FinalsConditions, fitsInto(), clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::Sema::getASTContext(), clang::Stmt::getBeginLoc(), clang::Expr::getExprLoc(), clang::APValue::getInt(), clang::ASTContext::getIntTypeForBitwidth(), clang::Sema::getLangOpts(), clang::CapturedDecl::getNumParams(), clang::CapturedDecl::getParam(), clang::Stmt::getSourceRange(), clang::ASTContext::getTrivialTypeSourceInfo(), clang::ValueDecl::getType(), clang::Expr::getType(), clang::ASTContext::hasSameType(), clang::Type::hasSignedIntegerRepresentation(), clang::Type::hasUnsignedIntegerRepresentation(), clang::Stmt::IgnoreContainers(), clang::Expr::IgnoreImpCasts(), clang::OMPLoopBasedDirective::HelperExprs::IL, clang::OMPLoopBasedDirective::HelperExprs::Inc, clang::OMPLoopBasedDirective::DistCombinedHelperExprs::Init, clang::OMPLoopBasedDirective::HelperExprs::Init, clang::OMPLoopBasedDirective::HelperExprs::Inits, clang::DeclContext::isDependentContext(), clang::Expr::isIntegerConstantExpr(), clang::isOpenMPDistributeDirective(), clang::isOpenMPGenericLoopDirective(), clang::isOpenMPLoopBoundSharingDirective(), clang::isOpenMPLoopTransformationDirective(), clang::isOpenMPTaskLoopDirective(), clang::isOpenMPWorksharingDirective(), clang::ActionResult< PtrTy, CompressInvalid >::isUsable(), clang::Expr::isValueDependent(), clang::OMPLoopBasedDirective::HelperExprs::IterationVarRef, clang::Sema::LangOpts, clang::OMPLoopBasedDirective::HelperExprs::LastIteration, clang::OMPLoopBasedDirective::DistCombinedHelperExprs::LB, clang::OMPLoopBasedDirective::HelperExprs::LB, clang::OMPLoopBasedDirective::DistCombinedHelperExprs::NLB, clang::OMPLoopBasedDirective::HelperExprs::NLB, clang::OMPLoopBasedDirective::DistCombinedHelperExprs::NUB, clang::OMPLoopBasedDirective::HelperExprs::NUB, clang::OMPLoopBasedDirective::HelperExprs::NumIterations, clang::OMPLoopBasedDirective::DistCombinedHelperExprs::ParForInDistCond, clang::Sema::PerformImplicitConversion(), clang::OMPLoopBasedDirective::HelperExprs::PreCond, clang::OMPLoopBasedDirective::HelperExprs::PreInits, clang::OMPLoopBasedDirective::HelperExprs::PrevEUB, clang::OMPLoopBasedDirective::HelperExprs::PrevLB, clang::OMPLoopBasedDirective::HelperExprs::PrevUB, clang::OMPLoopBasedDirective::HelperExprs::PrivateCounters, clang::Result, clang::OMPLoopBasedDirective::HelperExprs::ST, clang::OMPLoopBasedDirective::DistCombinedHelperExprs::UB, clang::OMPLoopBasedDirective::HelperExprs::UB, clang::OMPLoopBasedDirective::HelperExprs::Updates, clang::Expr::EvalResult::Val, and widenIterationCount().
Referenced by clang::Sema::ActOnOpenMPDistributeDirective(), clang::Sema::ActOnOpenMPDistributeParallelForDirective(), clang::Sema::ActOnOpenMPDistributeParallelForSimdDirective(), clang::Sema::ActOnOpenMPDistributeSimdDirective(), clang::Sema::ActOnOpenMPForDirective(), clang::Sema::ActOnOpenMPForSimdDirective(), clang::Sema::ActOnOpenMPGenericLoopDirective(), clang::Sema::ActOnOpenMPMaskedTaskLoopDirective(), clang::Sema::ActOnOpenMPMaskedTaskLoopSimdDirective(), clang::Sema::ActOnOpenMPMasterTaskLoopDirective(), clang::Sema::ActOnOpenMPMasterTaskLoopSimdDirective(), clang::Sema::ActOnOpenMPParallelForDirective(), clang::Sema::ActOnOpenMPParallelForSimdDirective(), clang::Sema::ActOnOpenMPParallelGenericLoopDirective(), clang::Sema::ActOnOpenMPParallelMaskedTaskLoopDirective(), clang::Sema::ActOnOpenMPParallelMaskedTaskLoopSimdDirective(), clang::Sema::ActOnOpenMPParallelMasterTaskLoopDirective(), clang::Sema::ActOnOpenMPParallelMasterTaskLoopSimdDirective(), clang::Sema::ActOnOpenMPSimdDirective(), clang::Sema::ActOnOpenMPTargetParallelForDirective(), clang::Sema::ActOnOpenMPTargetParallelForSimdDirective(), clang::Sema::ActOnOpenMPTargetParallelGenericLoopDirective(), clang::Sema::ActOnOpenMPTargetSimdDirective(), clang::Sema::ActOnOpenMPTargetTeamsDistributeDirective(), clang::Sema::ActOnOpenMPTargetTeamsDistributeParallelForDirective(), clang::Sema::ActOnOpenMPTargetTeamsDistributeParallelForSimdDirective(), clang::Sema::ActOnOpenMPTargetTeamsDistributeSimdDirective(), clang::Sema::ActOnOpenMPTargetTeamsGenericLoopDirective(), clang::Sema::ActOnOpenMPTaskLoopDirective(), clang::Sema::ActOnOpenMPTaskLoopSimdDirective(), clang::Sema::ActOnOpenMPTeamsDistributeDirective(), clang::Sema::ActOnOpenMPTeamsDistributeParallelForDirective(), clang::Sema::ActOnOpenMPTeamsDistributeParallelForSimdDirective(), clang::Sema::ActOnOpenMPTeamsDistributeSimdDirective(), and clang::Sema::ActOnOpenMPTeamsGenericLoopDirective().
Definition at line 4764 of file SemaOpenMP.cpp.
References clang::Sema::Diag(), clang::OMPClause::getBeginLoc(), clang::OMPClause::getClauseKind(), clang::OMPClause::getEndLoc(), clang::OMPOrderClause::getKind(), clang::OMPOrderClause::getKindKwLoc(), and clang::getOpenMPSimpleClauseTypeName().
Referenced by clang::Sema::ActOnOpenMPRegionEnd().
|
static |
Definition at line 3303 of file SemaOpenMP.cpp.
References clang::Sema::Context, clang::Sema::Diag(), getAllocatorKind(), clang::Decl::getAttr(), clang::Expr::getExprLoc(), clang::Sema::getPrintingPolicy(), clang::Stmt::getSourceRange(), clang::Decl::hasAttr(), clang::Expr::IgnoreParenImpCasts(), and clang::Stmt::Profile().
Referenced by clang::Sema::ActOnOpenMPAllocateDirective(), and checkAllocateClauses().
|
static |
Check consistency of the reduction clauses.
Definition at line 2778 of file SemaOpenMP.cpp.
References clang::C, clang::Sema::Diag(), getCanonicalDecl(), getPrivateItem(), clang::isOpenMPParallelDirective(), clang::isOpenMPSimdDirective(), clang::isOpenMPWorksharingDirective(), and clang::OMPC_REDUCTION_unknown.
Referenced by clang::Sema::EndOpenMPDSABlock().
Definition at line 13337 of file SemaOpenMP.cpp.
References clang::C, clang::Sema::Diag(), clang::OMPClause::getBeginLoc(), and clang::OMPClause::getEndLoc().
Referenced by clang::Sema::ActOnOpenMPMaskedTaskLoopDirective(), clang::Sema::ActOnOpenMPMaskedTaskLoopSimdDirective(), clang::Sema::ActOnOpenMPMasterTaskLoopDirective(), clang::Sema::ActOnOpenMPMasterTaskLoopSimdDirective(), clang::Sema::ActOnOpenMPParallelMaskedTaskLoopDirective(), clang::Sema::ActOnOpenMPParallelMaskedTaskLoopSimdDirective(), clang::Sema::ActOnOpenMPParallelMasterTaskLoopDirective(), clang::Sema::ActOnOpenMPParallelMasterTaskLoopSimdDirective(), clang::Sema::ActOnOpenMPTaskLoopDirective(), and clang::Sema::ActOnOpenMPTaskLoopSimdDirective().
|
static |
Definition at line 17147 of file SemaOpenMP.cpp.
References clang::Sema::Diag(), getListOfPossibleValues(), clang::SourceLocation::isValid(), clang::OMPC_SCHEDULE_MODIFIER_last, and clang::OMPC_SCHEDULE_MODIFIER_unknown.
Referenced by clang::Sema::ActOnOpenMPScheduleClause().
Definition at line 10247 of file SemaOpenMP.cpp.
References clang::Expr::containsUnexpandedParameterPack(), clang::Sema::Context, clang::Sema::Diag(), clang::Expr::EvaluateAsInt(), clang::OMPClause::getClauseKind(), clang::Expr::getExprLoc(), clang::APValue::getInt(), clang::OMPSafelenClause::getSafelen(), clang::OMPSimdlenClause::getSimdlen(), clang::Stmt::getSourceRange(), clang::Expr::isInstantiationDependent(), clang::Expr::isTypeDependent(), clang::Expr::isValueDependent(), and clang::Expr::EvalResult::Val.
Referenced by clang::Sema::ActOnOpenMPDistributeParallelForSimdDirective(), clang::Sema::ActOnOpenMPDistributeSimdDirective(), clang::Sema::ActOnOpenMPForSimdDirective(), clang::Sema::ActOnOpenMPMaskedTaskLoopSimdDirective(), clang::Sema::ActOnOpenMPMasterTaskLoopSimdDirective(), clang::Sema::ActOnOpenMPParallelForSimdDirective(), clang::Sema::ActOnOpenMPParallelMaskedTaskLoopSimdDirective(), clang::Sema::ActOnOpenMPParallelMasterTaskLoopSimdDirective(), clang::Sema::ActOnOpenMPSimdDirective(), clang::Sema::ActOnOpenMPTargetParallelForSimdDirective(), clang::Sema::ActOnOpenMPTargetSimdDirective(), clang::Sema::ActOnOpenMPTargetTeamsDistributeParallelForSimdDirective(), clang::Sema::ActOnOpenMPTargetTeamsDistributeSimdDirective(), clang::Sema::ActOnOpenMPTaskLoopSimdDirective(), clang::Sema::ActOnOpenMPTeamsDistributeParallelForSimdDirective(), and clang::Sema::ActOnOpenMPTeamsDistributeSimdDirective().
|
static |
Definition at line 20834 of file SemaOpenMP.cpp.
References clang::Sema::Context, clang::Sema::CurContext, clang::Sema::Diag(), clang::DeclContext::isDependentContext(), clang::QualType::isTriviallyCopyableType(), and clang::Sema::RequireCompleteType().
Referenced by checkMappableExpressionList(), and checkValueDeclInTarget().
|
static |
Definition at line 23000 of file SemaOpenMP.cpp.
References checkTypeMappable(), and clang::ValueDecl::getType().
Referenced by clang::Sema::checkDeclIsAllowedInOpenMPTarget().
|
static |
Definition at line 18714 of file SemaOpenMP.cpp.
Definition at line 18725 of file SemaOpenMP.cpp.
References clang::LookupResult::isVisible(), and clang::Decl::redecls().
|
static |
Tries to find omp_allocator_handle_t type.
Definition at line 16514 of file SemaOpenMP.cpp.
References clang::Sema::AA_Initializing, clang::QualType::addConst(), clang::Sema::BuildDeclRefExpr(), clang::Sema::Diag(), clang::OpaquePtr< PtrTy >::get(), clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::IdentifierTable::get(), clang::OpaquePtr< PtrTy >::getAsOpaquePtr(), clang::Sema::getASTContext(), clang::Sema::getCurScope(), clang::Preprocessor::getIdentifierTable(), clang::QualType::getNonLValueExprType(), clang::ValueDecl::getType(), clang::Sema::getTypeName(), clang::ASTContext::Idents, clang::QualType::isNull(), clang::ActionResult< PtrTy, CompressInvalid >::isUsable(), clang::Sema::LookupAnyName, clang::Sema::LookupSingleName(), clang::Sema::PerformImplicitConversion(), clang::Sema::PP, clang::Sema::TUScope, and clang::VK_LValue.
Referenced by clang::Sema::ActOnOpenMPAllocateClause(), clang::Sema::ActOnOpenMPAllocatorClause(), and clang::Sema::ActOnOpenMPUsesAllocatorClause().
|
static |
Tries to find omp_alloctrait_t type.
Definition at line 23645 of file SemaOpenMP.cpp.
References clang::Sema::Diag(), clang::OpaquePtr< PtrTy >::get(), clang::IdentifierTable::get(), clang::OpaquePtr< PtrTy >::getAsOpaquePtr(), clang::Sema::getCurScope(), clang::Preprocessor::getIdentifierTable(), clang::Sema::getTypeName(), clang::QualType::isNull(), and clang::Sema::PP.
Referenced by clang::Sema::ActOnOpenMPUsesAllocatorClause().
|
static |
Tries to find omp_depend_t. type.
Definition at line 20468 of file SemaOpenMP.cpp.
References clang::Sema::Diag(), clang::OpaquePtr< PtrTy >::get(), clang::IdentifierTable::get(), clang::OpaquePtr< PtrTy >::getAsOpaquePtr(), clang::Sema::getCurScope(), clang::Preprocessor::getIdentifierTable(), clang::Sema::getTypeName(), clang::QualType::isNull(), and clang::Sema::PP.
Referenced by clang::Sema::ActOnOpenMPDependClause(), and clang::Sema::ActOnOpenMPDepobjClause().
|
static |
Tries to find omp_event_handle_t type.
Definition at line 22643 of file SemaOpenMP.cpp.
References clang::Sema::Diag(), clang::OpaquePtr< PtrTy >::get(), clang::IdentifierTable::get(), clang::OpaquePtr< PtrTy >::getAsOpaquePtr(), clang::Sema::getCurScope(), clang::Preprocessor::getIdentifierTable(), clang::Sema::getTypeName(), clang::QualType::isNull(), and clang::Sema::PP.
Referenced by clang::Sema::ActOnOpenMPDetachClause().
|
static |
Definition at line 20074 of file SemaOpenMP.cpp.
References clang::Sema::ActOnFinishFullExpr(), clang::Sema::ActOnIntegerConstant(), clang::Sema::BuildBinOp(), buildCounterUpdate(), buildDeclRefExpr(), clang::Sema::DefaultLvalueConversion(), clang::Sema::Diag(), clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::OMPLinearClause::getCalcStep(), clang::OMPLinearClause::getModifier(), getPrivateItem(), clang::OMPLinearClause::getStep(), clang::OMPLinearClause::inits(), clang::isOpenMPDistributeDirective(), clang::isOpenMPSimdDirective(), clang::OMPLinearClause::privates(), clang::OMPLinearClause::setFinals(), clang::OMPLinearClause::setUpdates(), clang::OMPLinearClause::setUsedExprs(), clang::OMPVarListClause< T >::varlist_size(), and clang::OMPVarListClause< T >::varlists().
Referenced by clang::Sema::ActOnOpenMPDistributeParallelForSimdDirective(), clang::Sema::ActOnOpenMPDistributeSimdDirective(), clang::Sema::ActOnOpenMPForDirective(), clang::Sema::ActOnOpenMPForSimdDirective(), clang::Sema::ActOnOpenMPMaskedTaskLoopSimdDirective(), clang::Sema::ActOnOpenMPMasterTaskLoopSimdDirective(), clang::Sema::ActOnOpenMPParallelForDirective(), clang::Sema::ActOnOpenMPParallelForSimdDirective(), clang::Sema::ActOnOpenMPParallelMaskedTaskLoopSimdDirective(), clang::Sema::ActOnOpenMPParallelMasterTaskLoopSimdDirective(), clang::Sema::ActOnOpenMPSimdDirective(), clang::Sema::ActOnOpenMPTargetParallelForDirective(), clang::Sema::ActOnOpenMPTargetParallelForSimdDirective(), clang::Sema::ActOnOpenMPTargetSimdDirective(), clang::Sema::ActOnOpenMPTargetTeamsDistributeParallelForDirective(), clang::Sema::ActOnOpenMPTargetTeamsDistributeParallelForSimdDirective(), clang::Sema::ActOnOpenMPTargetTeamsDistributeSimdDirective(), clang::Sema::ActOnOpenMPTaskLoopSimdDirective(), clang::Sema::ActOnOpenMPTeamsDistributeParallelForSimdDirective(), and clang::Sema::ActOnOpenMPTeamsDistributeSimdDirective().
Check if the given expression E is a constant integer that fits into Bits bits.
Definition at line 9486 of file SemaOpenMP.cpp.
References clang::Sema::Context, clang::Expr::getIntegerConstantExpr(), clang::Result, and clang::Signed.
Referenced by checkOpenMPLoop().
|
static |
Definition at line 3278 of file SemaOpenMP.cpp.
References clang::Sema::getASTContext(), clang::Expr::IgnoreImpCasts(), and clang::Stmt::Profile().
Referenced by clang::Sema::ActOnOpenMPAllocateDirective(), clang::Sema::ActOnOpenMPUsesAllocatorClause(), checkAllocateClauses(), and checkPreviousOMPAllocateAttribute().
Definition at line 1250 of file SemaOpenMP.cpp.
References clang::VarDecl::getCanonicalDecl(), clang::FieldDecl::getCanonicalDecl(), and getExprAsWritten().
Referenced by getCanonicalDecl().
Definition at line 1267 of file SemaOpenMP.cpp.
References getCanonicalDecl().
Definition at line 10231 of file SemaOpenMP.cpp.
Referenced by clang::Sema::ActOnOpenMPDistributeDirective(), clang::Sema::ActOnOpenMPDistributeParallelForDirective(), clang::Sema::ActOnOpenMPDistributeParallelForSimdDirective(), clang::Sema::ActOnOpenMPDistributeSimdDirective(), clang::Sema::ActOnOpenMPForDirective(), clang::Sema::ActOnOpenMPForSimdDirective(), clang::Sema::ActOnOpenMPGenericLoopDirective(), clang::Sema::ActOnOpenMPMaskedTaskLoopDirective(), clang::Sema::ActOnOpenMPMaskedTaskLoopSimdDirective(), clang::Sema::ActOnOpenMPMasterTaskLoopDirective(), clang::Sema::ActOnOpenMPMasterTaskLoopSimdDirective(), clang::Sema::ActOnOpenMPParallelForDirective(), clang::Sema::ActOnOpenMPParallelForSimdDirective(), clang::Sema::ActOnOpenMPParallelGenericLoopDirective(), clang::Sema::ActOnOpenMPParallelMaskedTaskLoopDirective(), clang::Sema::ActOnOpenMPParallelMaskedTaskLoopSimdDirective(), clang::Sema::ActOnOpenMPParallelMasterTaskLoopDirective(), clang::Sema::ActOnOpenMPParallelMasterTaskLoopSimdDirective(), clang::Sema::ActOnOpenMPSimdDirective(), clang::Sema::ActOnOpenMPTargetParallelForDirective(), clang::Sema::ActOnOpenMPTargetParallelForSimdDirective(), clang::Sema::ActOnOpenMPTargetParallelGenericLoopDirective(), clang::Sema::ActOnOpenMPTargetSimdDirective(), clang::Sema::ActOnOpenMPTargetTeamsDistributeDirective(), clang::Sema::ActOnOpenMPTargetTeamsDistributeParallelForDirective(), clang::Sema::ActOnOpenMPTargetTeamsDistributeParallelForSimdDirective(), clang::Sema::ActOnOpenMPTargetTeamsDistributeSimdDirective(), clang::Sema::ActOnOpenMPTargetTeamsGenericLoopDirective(), clang::Sema::ActOnOpenMPTaskLoopDirective(), clang::Sema::ActOnOpenMPTaskLoopSimdDirective(), clang::Sema::ActOnOpenMPTeamsDistributeDirective(), clang::Sema::ActOnOpenMPTeamsDistributeParallelForDirective(), clang::Sema::ActOnOpenMPTeamsDistributeParallelForSimdDirective(), clang::Sema::ActOnOpenMPTeamsDistributeSimdDirective(), and clang::Sema::ActOnOpenMPTeamsGenericLoopDirective().
Definition at line 10458 of file SemaOpenMP.cpp.
References clang::Expr::IgnoreImplicit(), and clang::Expr::IgnoreParenCasts().
Referenced by clang::Sema::ActOnOpenMPDispatchDirective().
Definition at line 1231 of file SemaOpenMP.cpp.
References clang::Expr::IgnoreParens().
Referenced by getCanonicalDecl(), and getExprAsWritten().
Definition at line 1246 of file SemaOpenMP.cpp.
References getExprAsWritten().
|
static |
Definition at line 16750 of file SemaOpenMP.cpp.
References clang::First, clang::getOpenMPSimpleClauseTypeName(), and clang::Last.
Referenced by clang::Sema::ActOnOpenMPAtClause(), clang::Sema::ActOnOpenMPAtomicDefaultMemOrderClause(), clang::Sema::ActOnOpenMPBindClause(), clang::Sema::ActOnOpenMPDefaultClause(), clang::Sema::ActOnOpenMPDependClause(), clang::Sema::ActOnOpenMPDeviceClause(), clang::Sema::ActOnOpenMPGrainsizeClause(), clang::Sema::ActOnOpenMPLastprivateClause(), clang::Sema::ActOnOpenMPNumTasksClause(), clang::Sema::ActOnOpenMPOrderClause(), clang::Sema::ActOnOpenMPProcBindClause(), clang::Sema::ActOnOpenMPReductionClause(), clang::Sema::ActOnOpenMPScheduleClause(), clang::Sema::ActOnOpenMPSeverityClause(), clang::Sema::ActOnOpenMPUpdateClause(), and checkScheduleModifiers().
|
static |
Definition at line 3621 of file SemaOpenMP.cpp.
References clang::OMPC_DEFAULTMAP_MODIFIER_last, clang::OMPC_DEFAULTMAP_MODIFIER_unknown, and clang::OMPC_MAP_unknown.
|
static |
Definition at line 15318 of file SemaOpenMP.cpp.
Referenced by clang::Sema::ActOnOpenMPDeviceClause(), clang::Sema::ActOnOpenMPDistScheduleClause(), clang::Sema::ActOnOpenMPFilterClause(), clang::Sema::ActOnOpenMPFinalClause(), clang::Sema::ActOnOpenMPIfClause(), clang::Sema::ActOnOpenMPNocontextClause(), clang::Sema::ActOnOpenMPNovariantsClause(), clang::Sema::ActOnOpenMPNumTeamsClause(), clang::Sema::ActOnOpenMPNumThreadsClause(), clang::Sema::ActOnOpenMPScheduleClause(), clang::Sema::ActOnOpenMPThreadLimitClause(), clang::Sema::ActOnOpenMPXDynCGroupMemClause(), and isNonNegativeIntegerValue().
Definition at line 10239 of file SemaOpenMP.cpp.
Referenced by clang::Sema::ActOnOpenMPForDirective(), clang::Sema::ActOnOpenMPForSimdDirective(), clang::Sema::ActOnOpenMPGenericLoopDirective(), clang::Sema::ActOnOpenMPParallelForDirective(), clang::Sema::ActOnOpenMPParallelForSimdDirective(), clang::Sema::ActOnOpenMPSimdDirective(), clang::Sema::ActOnOpenMPTargetParallelForDirective(), clang::Sema::ActOnOpenMPTargetParallelForSimdDirective(), and clang::Sema::ActOnOpenMPTargetSimdDirective().
|
static |
Definition at line 5348 of file SemaOpenMP.cpp.
References clang::Expr::containsUnexpandedParameterPack(), clang::Sema::Diag(), getCanonicalDecl(), clang::Sema::getCurrentThisType(), clang::Expr::getExprLoc(), clang::Sema::getLangOpts(), clang::Stmt::getSourceRange(), clang::Expr::IgnoreParenImpCasts(), clang::Expr::IgnoreParens(), clang::QualType::isNull(), clang::Expr::isTypeDependent(), and clang::Expr::isValueDependent().
Referenced by actOnOMPReductionKindClause(), clang::Sema::ActOnOpenMPAlignedClause(), clang::Sema::ActOnOpenMPAllocateClause(), clang::Sema::ActOnOpenMPCopyprivateClause(), clang::Sema::ActOnOpenMPDependClause(), clang::Sema::ActOnOpenMPExclusiveClause(), clang::Sema::ActOnOpenMPFirstprivateClause(), clang::Sema::ActOnOpenMPHasDeviceAddrClause(), clang::Sema::ActOnOpenMPInclusiveClause(), clang::Sema::ActOnOpenMPInteropDirective(), clang::Sema::ActOnOpenMPIsDevicePtrClause(), clang::Sema::ActOnOpenMPLastprivateClause(), clang::Sema::ActOnOpenMPLinearClause(), clang::Sema::ActOnOpenMPNontemporalClause(), clang::Sema::ActOnOpenMPPrivateClause(), clang::Sema::ActOnOpenMPSharedClause(), clang::Sema::ActOnOpenMPUseDeviceAddrClause(), clang::Sema::ActOnOpenMPUseDevicePtrClause(), checkAllocateClauses(), checkGenericLoopLastprivate(), checkReductionClauses(), clang::Sema::EndOpenMPDSABlock(), FinishOpenMPLinearClause(), getDistributeLastprivateVars(), getTeamsReductionVars(), and isValidInteropVariable().
|
static |
Definition at line 19078 of file SemaOpenMP.cpp.
Referenced by actOnOMPReductionKindClause().
|
static |
Definition at line 2094 of file SemaOpenMP.cpp.
References clang::QualType::getNonReferenceType(), clang::ValueDecl::getType(), clang::Type::isAnyPointerType(), and clang::Type::isScalarType().
Referenced by clang::Sema::isOpenMPCapturedByRef(), and clang::Sema::setOpenMPCaptureKind().
|
static |
Definition at line 4157 of file SemaOpenMP.cpp.
References clang::isOpenMPParallelDirective(), clang::isOpenMPSimdDirective(), clang::isOpenMPTargetExecutionDirective(), clang::isOpenMPTeamsDirective(), and clang::isOpenMPWorksharingDirective().
Referenced by clang::Sema::ActOnOpenMPRegionEnd(), and clang::Sema::ActOnOpenMPRegionStart().
|
static |
Check for existence of a map clause in the list of clauses.
Definition at line 13108 of file SemaOpenMP.cpp.
References clang::C.
Referenced by clang::Sema::ActOnOpenMPInteropDirective(), clang::Sema::ActOnOpenMPTargetDataDirective(), clang::Sema::ActOnOpenMPTargetEnterDataDirective(), clang::Sema::ActOnOpenMPTargetExitDataDirective(), clang::Sema::ActOnOpenMPTargetUpdateDirective(), and hasClauses().
|
static |
Definition at line 13115 of file SemaOpenMP.cpp.
References hasClauses().
Check if the variables in the mapping clause are externally visible.
Definition at line 13121 of file SemaOpenMP.cpp.
References clang::C.
Referenced by clang::Sema::ActOnOpenMPTargetUpdateDirective().
|
static |
Definition at line 1684 of file SemaOpenMP.cpp.
References clang::Type::getAsCXXRecordDecl(), clang::Sema::getASTContext(), clang::ASTContext::getBaseElementType(), clang::Sema::getLangOpts(), clang::CXXRecordDecl::hasDefinition(), and clang::CXXRecordDecl::hasMutableFields().
Referenced by isValidInteropVariable(), and rejectConstNotMutableType().
|
static |
Definition at line 16371 of file SemaOpenMP.cpp.
References buildPreInits(), clang::Sema::Context, clang::Sema::CurContext, clang::Sema::Diag(), clang::Sema::FullExprArg::get(), clang::Expr::getExprLoc(), clang::Expr::getIntegerConstantExpr(), getOpenMPCaptureRegionForClause(), clang::Stmt::getSourceRange(), clang::DeclContext::isDependentContext(), clang::Expr::isInstantiationDependent(), clang::Expr::isTypeDependent(), clang::Expr::isValueDependent(), clang::Sema::LangOpts, clang::Sema::MakeFullExpr(), clang::Sema::PerformOpenMPImplicitIntegerConversion(), and clang::Result.
Referenced by clang::Sema::ActOnOpenMPDeviceClause(), clang::Sema::ActOnOpenMPGrainsizeClause(), clang::Sema::ActOnOpenMPNumTasksClause(), clang::Sema::ActOnOpenMPNumTeamsClause(), clang::Sema::ActOnOpenMPNumThreadsClause(), clang::Sema::ActOnOpenMPPriorityClause(), clang::Sema::ActOnOpenMPThreadLimitClause(), and clang::Sema::ActOnOpenMPXDynCGroupMemClause().
Definition at line 2013 of file SemaOpenMP.cpp.
References clang::Sema::isInOpenMPTargetExecutionDirective(), and clang::Sema::LangOpts.
Referenced by clang::Sema::diagIfOpenMPDeviceCode().
|
static |
Definition at line 17580 of file SemaOpenMP.cpp.
References clang::Sema::Context, clang::Sema::Diag(), clang::IdentifierTable::get(), clang::Sema::getCurScope(), getPrivateItem(), clang::Expr::getType(), clang::QualType::getUnqualifiedType(), clang::ASTContext::hasSameType(), clang::ASTContext::Idents, isConstNotMutableType(), clang::Sema::LookupName(), clang::Sema::LookupOrdinaryName, and clang::Result.
Referenced by clang::Sema::ActOnOpenMPDestroyClause(), clang::Sema::ActOnOpenMPInitClause(), and clang::Sema::ActOnOpenMPUseClause().
|
static |
Definition at line 5575 of file SemaOpenMP.cpp.
References clang::Sema::ActOnDeclStmt(), clang::Sema::AddInitializerToDecl(), clang::AssertSuccess(), buildVarDecl(), clang::Sema::ConvertDeclToDeclGroup(), clang::Expr::getType(), and clang::Expr::IgnoreImplicit().
Referenced by buildDistanceFunc().
|
static |
Perform DFS through the structure/class data members trying to find member(s) with user-defined 'default' mapper and generate implicit map clauses for such members with the found 'default' mapper.
Definition at line 5979 of file SemaOpenMP.cpp.
References clang::Sema::ActOnOpenMPMapClause(), clang::Sema::BuildMemberExpr(), buildUserDefinedMapperRef(), clang::C, clang::Expr::containsUnexpandedParameterPack(), clang::Sema::Context, clang::ASTContext::DeclarationNames, clang::Sema::DefaultLvalueConversion(), clang::RecordDecl::fields(), clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::IdentifierTable::get(), clang::Decl::getAccess(), clang::Type::getAsArrayTypeUnsafe(), clang::Type::getAsRecordDecl(), clang::OMPArraySectionExpr::getBaseOriginalType(), clang::QualType::getCanonicalType(), clang::Expr::getExprLoc(), clang::DeclarationNameTable::getIdentifier(), clang::Sema::getLangOpts(), clang::Type::getPointeeType(), clang::ValueDecl::getType(), clang::Expr::getType(), clang::QualType::getTypePtr(), clang::ASTContext::Idents, clang::Expr::IgnoreParenImpCasts(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), clang::QualType::isNull(), clang::Type::isSpecificBuiltinType(), clang::Type::isStructureOrClassType(), clang::Expr::isTypeDependent(), clang::Type::isUnionType(), clang::Expr::isValueDependent(), clang::DeclAccessPair::make(), clang::OK_Ordinary, P, clang::OpaqueValueExpr::setIsUnique(), clang::DeclarationNameInfo::setLoc(), clang::DeclarationNameInfo::setName(), and clang::VK_LValue.
Referenced by clang::Sema::ActOnOpenMPDeclareMapperDirective(), and clang::Sema::ActOnOpenMPExecutableDirective().
|
static |
Definition at line 1703 of file SemaOpenMP.cpp.
References clang::VarDecl::DeclarationOnly, Diag(), clang::Sema::Diag(), clang::Sema::getASTContext(), clang::Decl::getLocation(), isConstNotMutableType(), and clang::VarDecl::isThisDeclarationADefinition().
Referenced by actOnOMPReductionKindClause(), clang::Sema::ActOnOpenMPLastprivateClause(), clang::Sema::ActOnOpenMPPrivateClause(), and clang::Sema::CheckOpenMPLinearDecl().
|
static |
Definition at line 3563 of file SemaOpenMP.cpp.
References clang::Sema::Diag(), clang::Sema::getASTContext(), clang::Decl::getLocation(), clang::ValueDecl::getType(), clang::QualType::isConstant(), clang::VarDecl::isFileVarDecl(), clang::VarDecl::isLocalVarDecl(), clang::isOpenMPTaskingDirective(), clang::VarDecl::isStaticDataMember(), and clang::VarDecl::isStaticLocal().
Referenced by actOnOMPReductionKindClause(), clang::Sema::ActOnOpenMPCopyprivateClause(), clang::Sema::ActOnOpenMPDetachClause(), clang::Sema::ActOnOpenMPFirstprivateClause(), clang::Sema::ActOnOpenMPHasDeviceAddrClause(), clang::Sema::ActOnOpenMPIsDevicePtrClause(), clang::Sema::ActOnOpenMPLastprivateClause(), clang::Sema::ActOnOpenMPLinearClause(), clang::Sema::ActOnOpenMPLoopInitialization(), clang::Sema::ActOnOpenMPPrivateClause(), clang::Sema::ActOnOpenMPSharedClause(), clang::Sema::checkDeclIsAllowedInOpenMPTarget(), checkMappableExpressionList(), and clang::Sema::EndOpenMPDSABlock().
|
static |
Definition at line 7093 of file SemaOpenMP.cpp.
References clang::ParmVarDecl::Create(), clang::Sema::getASTContext(), clang::ValueDecl::getType(), clang::Type::isFunctionNoProtoType(), clang::Type::isFunctionProtoType(), P, clang::FunctionDecl::parameters(), clang::SC_None, and clang::ValueDecl::setType().
Referenced by clang::Sema::checkOpenMPDeclareVariantFunction().
|
static |
Convert integer expression E to make it have at least Bits bits.
Definition at line 9470 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().