|
clang 23.0.0git
|
#include "clang/Sema/SemaSYCL.h"
Additional Inherited Members | |
| Public Attributes inherited from clang::SemaBase | |
| Sema & | SemaRef |
Definition at line 27 of file SemaSYCL.h.
| SemaSYCL::SemaSYCL | ( | Sema & | S | ) |
Definition at line 28 of file SemaSYCL.cpp.
References clang::SemaBase::SemaBase().
| ExprResult SemaSYCL::ActOnUniqueStableNameExpr | ( | SourceLocation | OpLoc, |
| SourceLocation | LParen, | ||
| SourceLocation | RParen, | ||
| ParsedType | ParsedTy ) |
Definition at line 161 of file SemaSYCL.cpp.
References BuildUniqueStableNameExpr(), clang::ExprError(), clang::SemaBase::getASTContext(), clang::ASTContext::getTrivialTypeSourceInfo(), clang::QualType::isNull(), and clang::SemaBase::SemaRef.
| StmtResult SemaSYCL::BuildSYCLKernelCallStmt | ( | FunctionDecl * | FD, |
| CompoundStmt * | Body, | ||
| Expr * | LaunchIdExpr ) |
Builds a SYCLKernelCallStmt to wrap 'Body' and to be used as the body of 'FD'.
'LaunchIdExpr' specifies the lookup result returned by a previous call to BuildSYCLKernelLaunchIdExpr().
Definition at line 670 of file SemaSYCL.cpp.
References clang::declaresSameEntity(), clang::ActionResult< PtrTy, Compress >::get(), clang::SemaBase::getASTContext(), clang::Decl::getAttr(), clang::SYCLKernelInfo::getKernelEntryPointDecl(), clang::CompoundStmt::getLBracLoc(), clang::ASTContext::getSYCLKernelInfo(), clang::FunctionDecl::hasPrototype(), clang::ActionResult< PtrTy, Compress >::isInvalid(), clang::Decl::isInvalidDecl(), clang::Decl::isTemplated(), clang::SemaBase::SemaRef, and clang::StmtError().
Referenced by clang::Sema::ActOnFinishFunctionBody().
| ExprResult SemaSYCL::BuildSYCLKernelLaunchIdExpr | ( | FunctionDecl * | FD, |
| QualType | KernelName ) |
Builds an expression for the lookup of a 'sycl_kernel_launch' template with 'KernelName' as an explicit template argument.
Lookup is performed as if from the first statement of the body of 'FD' and thus requires searching the scopes that exist at parse time. This function therefore requires the current semantic context to be the definition of 'FD'. In a dependent context, the returned expression will be an UnresolvedLookupExpr or an UnresolvedMemberExpr. In a non-dependent context, the returned expression will be a DeclRefExpr or MemberExpr. If lookup fails, a null error result is returned. The resulting expression is intended to be passed as the 'LaunchIdExpr' argument in a call to either BuildSYCLKernelCallStmt() or BuildUnresolvedSYCLKernelCallStmt() after the function body has been parsed.
Definition at line 427 of file SemaSYCL.cpp.
References clang::TemplateArgumentListInfo::addArgument(), clang::Sema::CodeSynthesisContext::Entity, clang::ExprError(), clang::IdentifierTable::get(), clang::Decl::getLocation(), clang::ASTContext::Idents, clang::ActionResult< PtrTy, Compress >::isInvalid(), clang::Sema::CodeSynthesisContext::Kind, clang::Sema::LookupOrdinaryName, clang::Result, clang::SemaBase::SemaRef, clang::Sema::CodeSynthesisContext::SYCLKernelLaunchLookup, and clang::Sema::TemplateNameIsRequired.
Referenced by clang::Sema::ActOnStartOfFunctionDef().
| ExprResult SemaSYCL::BuildUniqueStableNameExpr | ( | SourceLocation | OpLoc, |
| SourceLocation | LParen, | ||
| SourceLocation | RParen, | ||
| TypeSourceInfo * | TSI ) |
Definition at line 153 of file SemaSYCL.cpp.
References clang::SYCLUniqueStableNameExpr::Create(), and clang::SemaBase::getASTContext().
Referenced by ActOnUniqueStableNameExpr(), and clang::TreeTransform< AdjustConstraints >::RebuildSYCLUniqueStableNameExpr().
| StmtResult SemaSYCL::BuildUnresolvedSYCLKernelCallStmt | ( | CompoundStmt * | Body, |
| Expr * | LaunchIdExpr ) |
Builds an UnresolvedSYCLKernelCallStmt to wrap 'Body'.
'LaunchIdExpr' specifies the lookup result returned by a previous call to BuildSYCLKernelLaunchIdExpr().
Definition at line 713 of file SemaSYCL.cpp.
References clang::UnresolvedSYCLKernelCallStmt::Create(), and clang::SemaBase::SemaRef.
Referenced by clang::Sema::ActOnFinishFunctionBody().
| void SemaSYCL::CheckDeviceUseOfDecl | ( | NamedDecl * | ND, |
| SourceLocation | Loc ) |
Issues a deferred diagnostic if use of the declaration designated by 'ND' is invalid in a device context.
Definition at line 224 of file SemaSYCL.cpp.
References DiagIfDeviceCode(), clang::SemaBase::getLangOpts(), and clang::SemaBase::SemaRef.
Referenced by clang::Sema::DiagnoseUseOfDecl().
| void SemaSYCL::CheckSYCLEntryPointFunctionDecl | ( | FunctionDecl * | FD | ) |
Definition at line 297 of file SemaSYCL.cpp.
References CheckSYCLKernelName(), clang::declaresSameEntity(), clang::SemaBase::Diag(), clang::ASTContext::findSYCLKernelInfo(), clang::SemaBase::getASTContext(), clang::Decl::getAttr(), clang::SYCLKernelInfo::getKernelEntryPointDecl(), clang::Decl::getLocation(), clang::FunctionDecl::getPreviousDecl(), clang::FunctionDecl::getReturnType(), clang::isa(), clang::FunctionDecl::isConsteval(), clang::FunctionDecl::isConstexpr(), clang::FunctionDecl::isDefaulted(), clang::FunctionDecl::isDeleted(), clang::Type::isDependentType(), clang::Decl::isInvalidDecl(), clang::FunctionDecl::isNoReturn(), clang::Decl::isTemplated(), clang::Type::isUndeducedType(), clang::FunctionDecl::isVariadic(), clang::Type::isVoidType(), clang::ASTContext::registerSYCLEntryPointFunction(), clang::SemaBase::SemaRef, and clang::Decl::specific_attrs().
Referenced by clang::Sema::ActOnLambdaExpr(), and clang::Sema::CheckFunctionDeclaration().
| void SemaSYCL::CheckSYCLExternalFunctionDecl | ( | FunctionDecl * | FD | ) |
Definition at line 280 of file SemaSYCL.cpp.
References clang::SemaBase::Diag(), clang::Decl::getAttr(), clang::FunctionDecl::getTemplateSpecializationInfo(), clang::FunctionDecl::isDeletedAsWritten(), clang::FunctionTemplateSpecializationInfo::isExplicitSpecialization(), clang::NamedDecl::isExternallyVisible(), clang::FunctionDecl::isFunctionTemplateSpecialization(), clang::Decl::isInvalidDecl(), and clang::Decl::isTemplated().
Referenced by clang::Sema::CheckFunctionDeclaration().
| void SemaSYCL::deepTypeCheckForDevice | ( | SourceLocation | UsedAt, |
| llvm::DenseSet< QualType > | Visited, | ||
| ValueDecl * | DeclToCheck ) |
Definition at line 61 of file SemaSYCL.cpp.
References DiagIfDeviceCode(), clang::Type::getArrayElementTypeNoTypeQual(), clang::Type::getAsRecordDecl(), clang::SemaBase::getLangOpts(), clang::Type::getPointeeType(), clang::Type::isAnyPointerType(), clang::Type::isArrayType(), clang::Type::isReferenceType(), isZeroSizedArray(), and Next.
| Sema::SemaDiagnosticBuilder SemaSYCL::DiagIfDeviceCode | ( | SourceLocation | Loc, |
| unsigned | DiagID ) |
Creates a SemaDiagnosticBuilder that emits the diagnostic if the current context is "used as device code".
Example usage:
Diagnose __float128 type usage only from SYCL device code if the current target doesn't support it if (!S.Context.getTargetInfo().hasFloat128Type() && S.getLangOpts().SYCLIsDevice) DiagIfDeviceCode(Loc, diag::err_type_unsupported) << "__float128";
Definition at line 30 of file SemaSYCL.cpp.
References clang::Sema::CUDADiscarded, clang::Sema::Emitted, clang::SemaBase::getLangOpts(), clang::Sema::OMPDiscarded, clang::SemaBase::SemaRef, clang::Sema::TemplateDiscarded, and clang::Sema::Unknown.
Referenced by CheckDeviceUseOfDecl(), and deepTypeCheckForDevice().
| void SemaSYCL::handleKernelAttr | ( | Decl * | D, |
| const ParsedAttr & | AL ) |
Definition at line 176 of file SemaSYCL.cpp.
References clang::cast(), clang::SemaBase::Diag(), clang::getFunctionOrMethodNumParams(), clang::getFunctionOrMethodResultType(), clang::Decl::getLocation(), clang::TemplateParameterList::getParam(), clang::TemplateDecl::getTemplateParameters(), clang::handleSimpleAttribute(), clang::isa(), clang::Type::isVoidType(), and clang::TemplateParameterList::size().
Referenced by ProcessDeclAttribute().
| void SemaSYCL::handleKernelEntryPointAttr | ( | Decl * | D, |
| const ParsedAttr & | AL ) |
Definition at line 215 of file SemaSYCL.cpp.
References clang::Decl::addAttr(), clang::ParsedAttr::getTypeArg(), and clang::SemaBase::SemaRef.
Referenced by ProcessDeclAttribute().