clang: clang::SemaSYCL Class Reference (original) (raw)

#include "[clang/Sema/SemaSYCL.h](SemaSYCL%5F8h%5Fsource.html)"

Public Member Functions
SemaSYCL (Sema &S)
SemaDiagnosticBuilder DiagIfDeviceCode (SourceLocation Loc, unsigned DiagID)
Creates a SemaDiagnosticBuilder that emits the diagnostic if the current context is "used as device code".
void deepTypeCheckForDevice (SourceLocation UsedAt, llvm::DenseSet< QualType > Visited, ValueDecl *DeclToCheck)
ExprResult BuildUniqueStableNameExpr (SourceLocation OpLoc, SourceLocation LParen, SourceLocation RParen, TypeSourceInfo *TSI)
ExprResult ActOnUniqueStableNameExpr (SourceLocation OpLoc, SourceLocation LParen, SourceLocation RParen, ParsedType ParsedTy)
void handleKernelAttr (Decl *D, const ParsedAttr &AL)
void handleKernelEntryPointAttr (Decl *D, const ParsedAttr &AL)
void CheckSYCLEntryPointFunctionDecl (FunctionDecl *FD)
StmtResult BuildSYCLKernelCallStmt (FunctionDecl *FD, CompoundStmt *Body)
- Public Member Functions inherited from clang::SemaBase
SemaBase (Sema &S)
ASTContext & getASTContext () const
DiagnosticsEngine & getDiagnostics () const
const LangOptions & getLangOpts () 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.
PartialDiagnostic PDiag (unsigned DiagID=0)
Build a partial diagnostic.

Definition at line 27 of file SemaSYCL.h.

SemaSYCL::SemaSYCL ( Sema & S )

ActOnUniqueStableNameExpr()

BuildSYCLKernelCallStmt()

Definition at line 415 of file SemaSYCL.cpp.

References clang::ImplicitParamDecl::Create(), clang::OutlinedFunctionDecl::Create(), clang::Sema::CurContext, clang::declaresSameEntity(), clang::SemaBase::getASTContext(), clang::Decl::getAttr(), clang::NamedDecl::getIdentifier(), clang::SYCLKernelInfo::getKernelEntryPointDecl(), clang::FunctionDecl::getNumParams(), clang::ASTContext::getSYCLKernelInfo(), clang::ValueDecl::getType(), clang::FunctionDecl::hasPrototype(), clang::Decl::isInvalidDecl(), clang::Decl::isTemplated(), clang::Other, clang::FunctionDecl::parameters(), clang::SemaBase::SemaRef, clang::OutlinedFunctionDecl::setBody(), clang::OutlinedFunctionDecl::setNothrow(), and clang::OutlinedFunctionDecl::setParam().

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

BuildUniqueStableNameExpr()

CheckSYCLEntryPointFunctionDecl()

void SemaSYCL::CheckSYCLEntryPointFunctionDecl ( FunctionDecl * FD )

Definition at line 253 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::Redeclarable< decl_type >::getPreviousDecl(), clang::FunctionDecl::getReturnType(), clang::ASTContext::hasSameType(), 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().

deepTypeCheckForDevice()

Definition at line 51 of file SemaSYCL.cpp.

References D, DiagIfDeviceCode(), clang::Type::getArrayElementTypeNoTypeQual(), clang::Type::getAsRecordDecl(), clang::SemaBase::getLangOpts(), clang::Decl::getLocation(), clang::Type::getPointeeType(), clang::Type::isAnyPointerType(), clang::Type::isArrayType(), clang::Type::isReferenceType(), isZeroSizedArray(), and Visited.

DiagIfDeviceCode()

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::Emitted, clang::Sema::getCurLexicalContext(), clang::Sema::getEmissionStatus(), clang::SemaBase::getLangOpts(), Loc, and clang::SemaBase::SemaRef.

Referenced by deepTypeCheckForDevice().

handleKernelAttr()

handleKernelEntryPointAttr()

void SemaSYCL::handleKernelEntryPointAttr ( Decl * D,
const ParsedAttr & AL
)

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