clang 22.0.0git
clang::SemaOpenACC Class Reference

#include "clang/Sema/SemaOpenACC.h"

Inheritance diagram for clang::SemaOpenACC:
[legend]

Classes

class  AssociatedStmtRAII
 Helper type for the registration/assignment of constructs that need to 'know' about their parent constructs and hold a reference to them, such as Loop needing its parent construct. More...
struct  LoopGangOnKernelTy
 If there is a current 'active' loop construct with a 'gang' clause on a 'kernel' construct, this will have the source location for it, and the 'kernel kind'. More...
class  LoopInConstructRAII
 Helper type to restore the state of various 'loop' constructs when we run into a loop (for, etc) inside the construct. More...
struct  LoopWithoutSeqCheckingInfo
 If there is a current 'active' loop construct that does NOT have a 'seq' clause on it, this has that source location and loop Directive 'kind'. More...
class  OpenACCParsedClause
 A type to represent all the data for an OpenACC Clause that has been parsed, but not yet created/semantically analyzed. More...

Public Types

using DeclGroupPtrTy = OpaquePtr<DeclGroupRef>
using DeviceTypeArgument = IdentifierLoc

Public Member Functions

bool DiagnoseAllowedOnceClauses (OpenACCDirectiveKind DK, OpenACCClauseKind CK, SourceLocation ClauseLoc, ArrayRef< const OpenACCClause * > Clauses)
bool DiagnoseExclusiveClauses (OpenACCDirectiveKind DK, OpenACCClauseKind CK, SourceLocation ClauseLoc, ArrayRef< const OpenACCClause * > Clauses)
OpenACCPrivateRecipe CreatePrivateInitRecipe (const Expr *VarExpr)
OpenACCFirstPrivateRecipe CreateFirstPrivateInitRecipe (const Expr *VarExpr)
OpenACCReductionRecipe CreateReductionInitRecipe (OpenACCReductionOperator ReductionOperator, const Expr *VarExpr)
ComputeConstructInfo & getActiveComputeConstructInfo ()
 SemaOpenACC (Sema &S)
void ActOnWhileStmt (SourceLocation WhileLoc)
void ActOnDoStmt (SourceLocation DoLoc)
void ActOnRangeForStmtBegin (SourceLocation ForLoc, const Stmt *OldRangeFor, const Stmt *RangeFor)
void ActOnRangeForStmtBegin (SourceLocation ForLoc, const Stmt *RangeFor)
void ActOnForStmtBegin (SourceLocation ForLoc, const Stmt *First, const Stmt *Second, const Stmt *Third)
void ActOnForStmtBegin (SourceLocation ForLoc, const Stmt *OldFirst, const Stmt *First, const Stmt *OldSecond, const Stmt *Second, const Stmt *OldThird, const Stmt *Third)
void ActOnForStmtEnd (SourceLocation ForLoc, StmtResult Body)
OpenACCClauseActOnClause (ArrayRef< const OpenACCClause * > ExistingClauses, OpenACCParsedClause &Clause)
 Called after parsing an OpenACC Clause so that it can be checked.
void ActOnConstruct (OpenACCDirectiveKind K, SourceLocation DirLoc)
 Called after the construct has been parsed, but clauses haven't been parsed.
bool ActOnStartStmtDirective (OpenACCDirectiveKind K, SourceLocation StartLoc, ArrayRef< const OpenACCClause * > Clauses)
 Called after the directive, including its clauses, have been parsed and parsing has consumed the 'annot_pragma_openacc_end' token.
bool ActOnStartDeclDirective (OpenACCDirectiveKind K, SourceLocation StartLoc, ArrayRef< const OpenACCClause * > Clauses)
 Called after the directive, including its clauses, have been parsed and parsing has consumed the 'annot_pragma_openacc_end' token.
StmtResult ActOnAssociatedStmt (SourceLocation DirectiveLoc, OpenACCDirectiveKind K, OpenACCAtomicKind AtKind, ArrayRef< const OpenACCClause * > Clauses, StmtResult AssocStmt)
 Called when we encounter an associated statement for our construct, this should check legality of the statement as it appertains to this Construct.
StmtResult ActOnAssociatedStmt (SourceLocation DirectiveLoc, OpenACCDirectiveKind K, ArrayRef< const OpenACCClause * > Clauses, StmtResult AssocStmt)
StmtResult CheckAtomicAssociatedStmt (SourceLocation AtomicDirLoc, OpenACCAtomicKind AtKind, StmtResult AssocStmt)
 Called to check the form of the atomic construct which has some fairly sizable restrictions.
StmtResult ActOnEndStmtDirective (OpenACCDirectiveKind K, SourceLocation StartLoc, SourceLocation DirLoc, SourceLocation LParenLoc, SourceLocation MiscLoc, ArrayRef< Expr * > Exprs, OpenACCAtomicKind AK, SourceLocation RParenLoc, SourceLocation EndLoc, ArrayRef< OpenACCClause * > Clauses, StmtResult AssocStmt)
 Called after the directive has been completely parsed, including the declaration group or associated statement.
DeclGroupRef ActOnEndDeclDirective (OpenACCDirectiveKind K, SourceLocation StartLoc, SourceLocation DirLoc, SourceLocation LParenLoc, SourceLocation RParenLoc, SourceLocation EndLoc, ArrayRef< OpenACCClause * > Clauses)
 Called after the directive has been completely parsed, including the declaration group or associated statement.
void CheckRoutineDecl (SourceLocation DirLoc, ArrayRef< const OpenACCClause * > Clauses, Decl *NextParsedDecl)
OpenACCRoutineDeclCheckRoutineDecl (SourceLocation StartLoc, SourceLocation DirLoc, SourceLocation LParenLoc, Expr *FuncRef, SourceLocation RParenLoc, ArrayRef< const OpenACCClause * > Clauses, SourceLocation EndLoc)
OpenACCRoutineDeclAttr * mergeRoutineDeclAttr (const OpenACCRoutineDeclAttr &Old)
DeclGroupRef ActOnEndRoutineDeclDirective (SourceLocation StartLoc, SourceLocation DirLoc, SourceLocation LParenLoc, Expr *ReferencedFunc, SourceLocation RParenLoc, ArrayRef< const OpenACCClause * > Clauses, SourceLocation EndLoc, DeclGroupPtrTy NextDecl)
StmtResult ActOnEndRoutineStmtDirective (SourceLocation StartLoc, SourceLocation DirLoc, SourceLocation LParenLoc, Expr *ReferencedFunc, SourceLocation RParenLoc, ArrayRef< const OpenACCClause * > Clauses, SourceLocation EndLoc, Stmt *NextStmt)
ExprResult ActOnIntExpr (OpenACCDirectiveKind DK, OpenACCClauseKind CK, SourceLocation Loc, Expr *IntExpr)
 Called when encountering an 'int-expr' for OpenACC, and manages conversions and diagnostics to 'int'.
void ActOnStartParseVar (OpenACCDirectiveKind DK, OpenACCClauseKind CK)
 Called right before a 'var' is parsed, so we can set the state for parsing a 'cache' var.
void ActOnInvalidParseVar ()
 Called only if the parse of a 'var' was invalid, else 'ActOnVar' should be called.
ExprResult ActOnVar (OpenACCDirectiveKind DK, OpenACCClauseKind CK, Expr *VarExpr)
 Called when encountering a 'var' for OpenACC, ensures it is actually a declaration reference to a variable of the correct type.
ExprResult ActOnCacheVar (Expr *VarExpr)
 Helper function called by ActonVar that is used to check a 'cache' var.
void ActOnVariableDeclarator (VarDecl *VD)
 Function called when a variable declarator is created, which lets us implement the 'routine' 'function static variables' restriction.
void ActOnFunctionDeclarator (FunctionDecl *FD)
 Called when a function decl is created, which lets us implement the 'routine' 'doesn't match next thing' warning.
void ActOnVariableInit (VarDecl *VD, QualType InitType)
 Called when a variable is initialized, so we can implement the 'routine 'doesn't match the next thing' warning for lambda init.
llvm::SmallVector< Expr * > CheckLinkClauseVarList (ArrayRef< Expr * > VarExpr)
bool CheckDeclareClause (SemaOpenACC::OpenACCParsedClause &Clause, OpenACCModifierKind Mods)
ExprResult ActOnRoutineName (Expr *RoutineName)
ExprResult CheckReductionVar (OpenACCDirectiveKind DirectiveKind, OpenACCReductionOperator ReductionOp, Expr *VarExpr)
 Called while semantically analyzing the reduction clause, ensuring the var is the correct kind of reference.
bool CheckVarIsPointerType (OpenACCClauseKind ClauseKind, Expr *VarExpr)
 Called to check the 'var' type is a variable of pointer type, necessary for 'deviceptr' and 'attach' clauses.
ExprResult ActOnArraySectionExpr (Expr *Base, SourceLocation LBLoc, Expr *LowerBound, SourceLocation ColonLocFirst, Expr *Length, SourceLocation RBLoc)
 Checks and creates an Array Section used in an OpenACC construct/clause.
ExprResult CheckCollapseLoopCount (Expr *LoopCount)
 Checks the loop depth value for a collapse clause.
ExprResult CheckTileSizeExpr (Expr *SizeExpr)
 Checks a single size expr for a tile clause.
ExprResult CheckGangExpr (ArrayRef< const OpenACCClause * > ExistingClauses, OpenACCDirectiveKind DK, OpenACCGangKind GK, Expr *E)
void CheckDeclReference (SourceLocation Loc, Expr *E, Decl *D)
OpenACCClauseCheckGangClause (OpenACCDirectiveKind DirKind, ArrayRef< const OpenACCClause * > ExistingClauses, SourceLocation BeginLoc, SourceLocation LParenLoc, ArrayRef< OpenACCGangKind > GangKinds, ArrayRef< Expr * > IntExprs, SourceLocation EndLoc)
OpenACCClauseCheckReductionClause (ArrayRef< const OpenACCClause * > ExistingClauses, OpenACCDirectiveKind DirectiveKind, SourceLocation BeginLoc, SourceLocation LParenLoc, OpenACCReductionOperator ReductionOp, ArrayRef< Expr * > Vars, ArrayRef< OpenACCReductionRecipe > Recipes, SourceLocation EndLoc)
ExprResult BuildOpenACCAsteriskSizeExpr (SourceLocation AsteriskLoc)
ExprResult ActOnOpenACCAsteriskSizeExpr (SourceLocation AsteriskLoc)
Public Member Functions inherited from clang::SemaBase
 SemaBase (Sema &S)
ASTContextgetASTContext () const
DiagnosticsEnginegetDiagnostics () const
const LangOptionsgetLangOpts () const
DeclContextgetCurContext () const
SemaDiagnosticBuilder Diag (SourceLocation Loc, unsigned DiagID, bool DeferHint=false)
 Emit a diagnostic.
SemaDiagnosticBuilder Diag (SourceLocation Loc, const PartialDiagnostic &PD, bool DeferHint=false)
 Emit a partial diagnostic.
SemaDiagnosticBuilder DiagCompat (SourceLocation Loc, unsigned CompatDiagId, bool DeferHint=false)
 Emit a compatibility diagnostic.
PartialDiagnostic PDiag (unsigned DiagID=0)
 Build a partial diagnostic.

Public Attributes

struct clang::SemaOpenACC::LoopGangOnKernelTy LoopGangClauseOnKernel
SourceLocation LoopWorkerClauseLoc
 If there is a current 'active' loop construct with a 'worker' clause on it (on any sort of construct), this has the source location for it.
SourceLocation LoopVectorClauseLoc
 If there is a current 'active' loop construct with a 'vector' clause on it (on any sort of construct), this has the source location for it.
struct clang::SemaOpenACC::LoopWithoutSeqCheckingInfo LoopWithoutSeqInfo
Public Attributes inherited from clang::SemaBase
SemaSemaRef

Detailed Description

Definition at line 37 of file SemaOpenACC.h.

Member Typedef Documentation

◆ DeclGroupPtrTy

◆ DeviceTypeArgument

Constructor & Destructor Documentation

◆ SemaOpenACC()

Member Function Documentation

◆ ActOnArraySectionExpr()

◆ ActOnAssociatedStmt() [1/2]

StmtResult clang::SemaOpenACC::ActOnAssociatedStmt ( SourceLocation DirectiveLoc,
OpenACCDirectiveKind K,
ArrayRef< const OpenACCClause * > Clauses,
StmtResult AssocStmt )
inline

Definition at line 803 of file SemaOpenACC.h.

References ActOnAssociatedStmt(), and clang::None.

◆ ActOnAssociatedStmt() [2/2]

◆ ActOnCacheVar()

ExprResult SemaOpenACC::ActOnCacheVar ( Expr * VarExpr)

Helper function called by ActonVar that is used to check a 'cache' var.

Definition at line 536 of file SemaOpenACC.cpp.

References clang::cast(), clang::SemaBase::Diag(), clang::ExprEmpty(), clang::ExprError(), clang::Expr::getExprLoc(), clang::Expr::IgnoreParenImpCasts(), and clang::isa().

Referenced by ActOnVar().

◆ ActOnClause()

OpenACCClause * SemaOpenACC::ActOnClause ( ArrayRef< const OpenACCClause * > ExistingClauses,
OpenACCParsedClause & Clause )

Called after parsing an OpenACC Clause so that it can be checked.

Definition at line 1886 of file SemaOpenACCClause.cpp.

References clang::cast(), clang::Invalid, and clang::Result.

◆ ActOnConstruct()

void SemaOpenACC::ActOnConstruct ( OpenACCDirectiveKind K,
SourceLocation DirLoc )

Called after the construct has been parsed, but clauses haven't been parsed.

This allows us to diagnose not-implemented, as well as set up any state required for parsing the clauses.

Definition at line 382 of file SemaOpenACC.cpp.

References clang::Sema::PotentiallyEvaluated, and clang::SemaBase::SemaRef.

◆ ActOnDoStmt()

void SemaOpenACC::ActOnDoStmt ( SourceLocation DoLoc)

◆ ActOnEndDeclDirective()

DeclGroupRef SemaOpenACC::ActOnEndDeclDirective ( OpenACCDirectiveKind K,
SourceLocation StartLoc,
SourceLocation DirLoc,
SourceLocation LParenLoc,
SourceLocation RParenLoc,
SourceLocation EndLoc,
ArrayRef< OpenACCClause * > Clauses )

Called after the directive has been completely parsed, including the declaration group or associated statement.

Definition at line 2303 of file SemaOpenACC.cpp.

References clang::DeclContext::addDecl(), clang::AS_public, clang::OpenACCDeclareDecl::Create(), clang::Declare, clang::SemaBase::Diag(), clang::SemaBase::getASTContext(), clang::SemaBase::getCurContext(), clang::Invalid, and clang::Routine.

Referenced by ActOnEndStmtDirective().

◆ ActOnEndRoutineDeclDirective()

DeclGroupRef SemaOpenACC::ActOnEndRoutineDeclDirective ( SourceLocation StartLoc,
SourceLocation DirLoc,
SourceLocation LParenLoc,
Expr * ReferencedFunc,
SourceLocation RParenLoc,
ArrayRef< const OpenACCClause * > Clauses,
SourceLocation EndLoc,
DeclGroupPtrTy NextDecl )

◆ ActOnEndRoutineStmtDirective()

StmtResult SemaOpenACC::ActOnEndRoutineStmtDirective ( SourceLocation StartLoc,
SourceLocation DirLoc,
SourceLocation LParenLoc,
Expr * ReferencedFunc,
SourceLocation RParenLoc,
ArrayRef< const OpenACCClause * > Clauses,
SourceLocation EndLoc,
Stmt * NextStmt )

◆ ActOnEndStmtDirective()

StmtResult SemaOpenACC::ActOnEndStmtDirective ( OpenACCDirectiveKind K,
SourceLocation StartLoc,
SourceLocation DirLoc,
SourceLocation LParenLoc,
SourceLocation MiscLoc,
ArrayRef< Expr * > Exprs,
OpenACCAtomicKind AK,
SourceLocation RParenLoc,
SourceLocation EndLoc,
ArrayRef< OpenACCClause * > Clauses,
StmtResult AssocStmt )

Called after the directive has been completely parsed, including the declaration group or associated statement.

DirLoc: Location of the actual directive keyword. LParenLoc: Location of the left paren, if it exists (not on all constructs). MiscLoc: First misc location, if necessary (not all constructs). Exprs: List of expressions on the construct itself, if necessary (not all constructs). FuncRef: used only for Routine, this is the function being referenced. AK: The atomic kind of the directive, if necessary (atomic only) RParenLoc: Location of the right paren, if it exists (not on all constructs). EndLoc: The last source location of the driective. Clauses: The list of clauses for the directive, if present. AssocStmt: The associated statement for this construct, if necessary.

Definition at line 2064 of file SemaOpenACC.cpp.

References ActOnEndDeclDirective(), clang::Atomic, clang::Cache, OpenACCAtomicConstruct::Create(), OpenACCCacheConstruct::Create(), OpenACCCombinedConstruct::Create(), OpenACCDataConstruct::Create(), OpenACCEnterDataConstruct::Create(), OpenACCExitDataConstruct::Create(), OpenACCHostDataConstruct::Create(), OpenACCInitConstruct::Create(), OpenACCLoopConstruct::Create(), OpenACCSetConstruct::Create(), OpenACCShutdownConstruct::Create(), OpenACCUpdateConstruct::Create(), OpenACCWaitConstruct::Create(), clang::Data, clang::Declare, clang::EnterData, clang::ExitData, clang::ActionResult< PtrTy, Compress >::get(), clang::SemaBase::getASTContext(), clang::HostData, clang::Init, clang::Invalid, clang::ActionResult< PtrTy, Compress >::isUsable(), clang::Kernels, clang::KernelsLoop, clang::Loop, clang::OpaquePtr< DeclGroupRef >::make(), clang::Parallel, clang::ParallelLoop, clang::Routine, clang::SemaBase::SemaRef, clang::Serial, clang::SerialLoop, clang::Set, clang::Shutdown, clang::StmtError(), clang::Update, and clang::Wait.

Referenced by clang::Parser::ParseOpenACCDirectiveStmt(), clang::TreeTransform< AdjustConstraintDepth >::RebuildOpenACCAtomicConstruct(), clang::TreeTransform< AdjustConstraintDepth >::RebuildOpenACCCacheConstruct(), clang::TreeTransform< AdjustConstraintDepth >::RebuildOpenACCCombinedConstruct(), clang::TreeTransform< AdjustConstraintDepth >::RebuildOpenACCComputeConstruct(), clang::TreeTransform< AdjustConstraintDepth >::RebuildOpenACCDataConstruct(), clang::TreeTransform< AdjustConstraintDepth >::RebuildOpenACCEnterDataConstruct(), clang::TreeTransform< AdjustConstraintDepth >::RebuildOpenACCExitDataConstruct(), clang::TreeTransform< AdjustConstraintDepth >::RebuildOpenACCHostDataConstruct(), clang::TreeTransform< AdjustConstraintDepth >::RebuildOpenACCInitConstruct(), clang::TreeTransform< AdjustConstraintDepth >::RebuildOpenACCLoopConstruct(), clang::TreeTransform< AdjustConstraintDepth >::RebuildOpenACCSetConstruct(), clang::TreeTransform< AdjustConstraintDepth >::RebuildOpenACCShutdownConstruct(), clang::TreeTransform< AdjustConstraintDepth >::RebuildOpenACCUpdateConstruct(), and clang::TreeTransform< AdjustConstraintDepth >::RebuildOpenACCWaitConstruct().

◆ ActOnForStmtBegin() [1/2]

void SemaOpenACC::ActOnForStmtBegin ( SourceLocation ForLoc,
const Stmt * First,
const Stmt * Second,
const Stmt * Third )

Definition at line 1707 of file SemaOpenACC.cpp.

References clang::First, and clang::SemaBase::getLangOpts().

◆ ActOnForStmtBegin() [2/2]

void SemaOpenACC::ActOnForStmtBegin ( SourceLocation ForLoc,
const Stmt * OldFirst,
const Stmt * First,
const Stmt * OldSecond,
const Stmt * Second,
const Stmt * OldThird,
const Stmt * Third )

Definition at line 1689 of file SemaOpenACC.cpp.

References clang::First, and clang::SemaBase::getLangOpts().

◆ ActOnForStmtEnd()

◆ ActOnFunctionDeclarator()

void SemaOpenACC::ActOnFunctionDeclarator ( FunctionDecl * FD)

Called when a function decl is created, which lets us implement the 'routine' 'doesn't match next thing' warning.

Definition at line 2018 of file SemaOpenACC.cpp.

References clang::SemaBase::getLangOpts().

Referenced by clang::Sema::ActOnFunctionDeclarator().

◆ ActOnIntExpr()

◆ ActOnInvalidParseVar()

void SemaOpenACC::ActOnInvalidParseVar ( )

Called only if the parse of a 'var' was invalid, else 'ActOnVar' should be called.

Definition at line 531 of file SemaOpenACC.cpp.

◆ ActOnOpenACCAsteriskSizeExpr()

ExprResult SemaOpenACC::ActOnOpenACCAsteriskSizeExpr ( SourceLocation AsteriskLoc)

◆ ActOnRangeForStmtBegin() [1/2]

void SemaOpenACC::ActOnRangeForStmtBegin ( SourceLocation ForLoc,
const Stmt * OldRangeFor,
const Stmt * RangeFor )

Definition at line 1722 of file SemaOpenACC.cpp.

References clang::SemaBase::getLangOpts().

◆ ActOnRangeForStmtBegin() [2/2]

void SemaOpenACC::ActOnRangeForStmtBegin ( SourceLocation ForLoc,
const Stmt * RangeFor )

Definition at line 1739 of file SemaOpenACC.cpp.

References clang::SemaBase::getLangOpts().

◆ ActOnRoutineName()

◆ ActOnStartDeclDirective()

bool SemaOpenACC::ActOnStartDeclDirective ( OpenACCDirectiveKind K,
SourceLocation StartLoc,
ArrayRef< const OpenACCClause * > Clauses )

Called after the directive, including its clauses, have been parsed and parsing has consumed the 'annot_pragma_openacc_end' token.

This DOES happen before any associated declarations or statements have been parsed. This function is only called when we are parsing a 'Decl' context.

Definition at line 2285 of file SemaOpenACC.cpp.

References clang::Routine, and clang::SemaBase::SemaRef.

Referenced by ActOnStartStmtDirective().

◆ ActOnStartParseVar()

void SemaOpenACC::ActOnStartParseVar ( OpenACCDirectiveKind DK,
OpenACCClauseKind CK )

Called right before a 'var' is parsed, so we can set the state for parsing a 'cache' var.

Definition at line 523 of file SemaOpenACC.cpp.

References clang::Cache.

◆ ActOnStartStmtDirective()

bool SemaOpenACC::ActOnStartStmtDirective ( OpenACCDirectiveKind K,
SourceLocation StartLoc,
ArrayRef< const OpenACCClause * > Clauses )

Called after the directive, including its clauses, have been parsed and parsing has consumed the 'annot_pragma_openacc_end' token.

This DOES happen before any associated declarations or statements have been parsed. This function is only called when we are parsing a 'statement' context.

Definition at line 2024 of file SemaOpenACC.cpp.

References ActOnStartDeclDirective(), clang::Collapse, clang::Declare, clang::SemaBase::Diag(), clang::Routine, clang::SemaBase::SemaRef, and clang::Tile.

◆ ActOnVar()

ExprResult SemaOpenACC::ActOnVar ( OpenACCDirectiveKind DK,
OpenACCClauseKind CK,
Expr * VarExpr )

Called when encountering a 'var' for OpenACC, ensures it is actually a declaration reference to a variable of the correct type.

Definition at line 718 of file SemaOpenACC.cpp.

References ActOnCacheVar(), clang::Cache, clang::cast(), clang::Declare, clang::SemaBase::Diag(), clang::ExprError(), clang::Expr::getExprLoc(), clang::Expr::IgnoreParenImpCasts(), clang::isa(), clang::Reduction, and clang::UseDevice.

◆ ActOnVariableDeclarator()

void SemaOpenACC::ActOnVariableDeclarator ( VarDecl * VD)

Function called when a variable declarator is created, which lets us implement the 'routine' 'function static variables' restriction.

Definition at line 1919 of file SemaOpenACC.cpp.

References clang::SemaBase::Diag(), clang::DeclaratorDecl::getBeginLoc(), clang::SemaBase::getCurContext(), clang::SemaBase::getLangOpts(), clang::isa(), clang::Decl::isInvalidDecl(), clang::VarDecl::isStaticLocal(), and clang::Routine.

Referenced by clang::Sema::ActOnVariableDeclarator().

◆ ActOnVariableInit()

void SemaOpenACC::ActOnVariableInit ( VarDecl * VD,
QualType InitType )

Called when a variable is initialized, so we can implement the 'routine 'doesn't match the next thing' warning for lambda init.

Definition at line 2000 of file SemaOpenACC.cpp.

References clang::Type::getAsCXXRecordDecl(), clang::SemaBase::getLangOpts(), clang::Decl::getLexicalDeclContext(), clang::DeclContext::isDependentContext(), and clang::QualType::isNull().

Referenced by clang::Sema::AddInitializerToDecl().

◆ ActOnWhileStmt()

void SemaOpenACC::ActOnWhileStmt ( SourceLocation WhileLoc)

◆ BuildOpenACCAsteriskSizeExpr()

ExprResult SemaOpenACC::BuildOpenACCAsteriskSizeExpr ( SourceLocation AsteriskLoc)

◆ CheckAtomicAssociatedStmt()

StmtResult SemaOpenACC::CheckAtomicAssociatedStmt ( SourceLocation AtomicDirLoc,
OpenACCAtomicKind AtKind,
StmtResult AssocStmt )

Called to check the form of the atomic construct which has some fairly sizable restrictions.

Definition at line 732 of file SemaOpenACCAtomic.cpp.

References clang::ActionResult< PtrTy, Compress >::get(), clang::isa(), and clang::ActionResult< PtrTy, Compress >::isUsable().

Referenced by ActOnAssociatedStmt().

◆ CheckCollapseLoopCount()

◆ CheckDeclareClause()

◆ CheckDeclReference()

◆ CheckGangClause()

◆ CheckGangExpr()

◆ CheckLinkClauseVarList()

llvm::SmallVector< Expr * > SemaOpenACC::CheckLinkClauseVarList ( ArrayRef< Expr * > VarExpr)

◆ CheckReductionClause()

◆ CheckReductionVar()

ExprResult SemaOpenACC::CheckReductionVar ( OpenACCDirectiveKind DirectiveKind,
OpenACCReductionOperator ReductionOp,
Expr * VarExpr )

Called while semantically analyzing the reduction clause, ensuring the var is the correct kind of reference.

OpenACC 3.3 section 2.5.15: At a mininmum, the supported data types include ... the numerical data types in C, C++, and Fortran.

If the reduction var is a composite variable, each member of the composite variable must be a supported datatype for the reduction operation.

Definition at line 1925 of file SemaOpenACCClause.cpp.

References Diag(), clang::ExprError(), clang::Type::getAsRecordDecl(), clang::SemaBase::getASTContext(), clang::ArraySectionExpr::getBaseOriginalType(), clang::Stmt::getBeginLoc(), clang::Expr::getExprLoc(), clang::Expr::getType(), clang::Expr::IgnoreParenCasts(), clang::Expr::isInstantiationDependent(), and clang::SemaBase::PDiag().

◆ CheckRoutineDecl() [1/2]

void SemaOpenACC::CheckRoutineDecl ( SourceLocation DirLoc,
ArrayRef< const OpenACCClause * > Clauses,
Decl * NextParsedDecl )

◆ CheckRoutineDecl() [2/2]

◆ CheckTileSizeExpr()

◆ CheckVarIsPointerType()

bool SemaOpenACC::CheckVarIsPointerType ( OpenACCClauseKind ClauseKind,
Expr * VarExpr )

◆ CreateFirstPrivateInitRecipe()

◆ CreatePrivateInitRecipe()

◆ CreateReductionInitRecipe()

◆ DiagnoseAllowedOnceClauses()

bool SemaOpenACC::DiagnoseAllowedOnceClauses ( OpenACCDirectiveKind DK,
OpenACCClauseKind CK,
SourceLocation ClauseLoc,
ArrayRef< const OpenACCClause * > Clauses )

◆ DiagnoseExclusiveClauses()

bool SemaOpenACC::DiagnoseExclusiveClauses ( OpenACCDirectiveKind DK,
OpenACCClauseKind CK,
SourceLocation ClauseLoc,
ArrayRef< const OpenACCClause * > Clauses )

◆ getActiveComputeConstructInfo()

ComputeConstructInfo & clang::SemaOpenACC::getActiveComputeConstructInfo ( )
inline

Definition at line 248 of file SemaOpenACC.h.

◆ mergeRoutineDeclAttr()

OpenACCRoutineDeclAttr * SemaOpenACC::mergeRoutineDeclAttr ( const OpenACCRoutineDeclAttr & Old)

Definition at line 2574 of file SemaOpenACC.cpp.

References clang::SemaBase::getASTContext(), and New.

Referenced by mergeDeclAttribute().

Member Data Documentation

◆ LoopGangClauseOnKernel

struct clang::SemaOpenACC::LoopGangOnKernelTy clang::SemaOpenACC::LoopGangClauseOnKernel

◆ LoopVectorClauseLoc

SourceLocation clang::SemaOpenACC::LoopVectorClauseLoc

If there is a current 'active' loop construct with a 'vector' clause on it (on any sort of construct), this has the source location for it.

This permits us to implement the restriction of no further 'gang', 'vector', or 'worker' clauses.

Definition at line 270 of file SemaOpenACC.h.

Referenced by clang::SemaOpenACC::AssociatedStmtRAII::AssociatedStmtRAII().

◆ LoopWithoutSeqInfo

◆ LoopWorkerClauseLoc

SourceLocation clang::SemaOpenACC::LoopWorkerClauseLoc

If there is a current 'active' loop construct with a 'worker' clause on it (on any sort of construct), this has the source location for it.

This permits us to implement the restriction of no further 'gang' or 'worker' clauses.

Definition at line 265 of file SemaOpenACC.h.

Referenced by clang::SemaOpenACC::AssociatedStmtRAII::AssociatedStmtRAII().


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