clang: clang::SemaSYCL Class Reference (original) (raw)
#include "[clang/Sema/SemaSYCL.h](SemaSYCL%5F8h%5Fsource.html)"
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".
- If CurLexicalContext is a kernel function or it is known that the function will be emitted for the device, emits the diagnostics immediately.
- If CurLexicalContext is a function and we are compiling for the device, but we don't know yet that this function will be codegen'ed for the devive, creates a diagnostic which is emitted if and when we realize that the function will be codegen'ed.
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:
- include/clang/Sema/SemaSYCL.h
- lib/Sema/SemaSYCL.cpp