clang 22.0.0git
clang::SemaOpenCL Class Reference

#include "clang/Sema/SemaOpenCL.h"

Inheritance diagram for clang::SemaOpenCL:
[legend]

Public Member Functions

 SemaOpenCL (Sema &S)
void handleNoSVMAttr (Decl *D, const ParsedAttr &AL)
void handleAccessAttr (Decl *D, const ParsedAttr &AL)
void handleSubGroupSize (Decl *D, const ParsedAttr &AL)
bool checkBuiltinRWPipe (CallExpr *Call)
bool checkBuiltinReserveRWPipe (CallExpr *Call)
bool checkSubgroupExt (CallExpr *Call)
bool checkBuiltinCommitRWPipe (CallExpr *Call)
bool checkBuiltinPipePackets (CallExpr *Call)
bool checkBuiltinToAddr (unsigned BuiltinID, CallExpr *Call)
bool checkBuiltinEnqueueKernel (CallExpr *TheCall)
 OpenCL C v2.0, s6.13.17 - Enqueue kernel function contains four different overload formats specified in Table 6.13.17.1.
bool checkBuiltinKernelWorkGroupSize (CallExpr *TheCall)
 OpenCL C v2.0, s6.13.17.6 - Check the argument to the get_kernel_work_group_size and get_kernel_preferred_work_group_size_multiple builtin functions.
bool checkBuiltinNDRangeAndBlock (CallExpr *TheCall)
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.

Additional Inherited Members

Public Attributes inherited from clang::SemaBase
SemaSemaRef

Detailed Description

Definition at line 22 of file SemaOpenCL.h.

Constructor & Destructor Documentation

◆ SemaOpenCL()

clang::SemaOpenCL::SemaOpenCL ( Sema & S)

Definition at line 21 of file SemaOpenCL.cpp.

References clang::SemaBase::SemaBase().

Member Function Documentation

◆ checkBuiltinCommitRWPipe()

◆ checkBuiltinEnqueueKernel()

bool clang::SemaOpenCL::checkBuiltinEnqueueKernel ( CallExpr * TheCall)

OpenCL C v2.0, s6.13.17 - Enqueue kernel function contains four different overload formats specified in Table 6.13.17.1.

int enqueue_kernel(queue_t queue, kernel_enqueue_flags_t flags, const ndrange_t ndrange, void (^block)(void)) int enqueue_kernel(queue_t queue, kernel_enqueue_flags_t flags, const ndrange_t ndrange, uint num_events_in_wait_list, clk_event_t event_wait_list, clk_event_t *event_ret, void (^block)(void)) int enqueue_kernel(queue_t queue, kernel_enqueue_flags_t flags, const ndrange_t ndrange, void (^block)(local void, ...), uint size0, ...) int enqueue_kernel(queue_t queue, kernel_enqueue_flags_t flags, const ndrange_t ndrange, uint num_events_in_wait_list, clk_event_t event_wait_list, clk_event_t *event_ret, void (^block)(local void, ...), uint size0, ...)

Definition at line 239 of file SemaOpenCL.cpp.

References clang::cast(), clang::Type::castAs(), clang::checkBlockArgs(), clang::checkOpenCLEnqueueVariadicArgs(), clang::SemaBase::Diag(), clang::CallExpr::getArg(), clang::QualType::getAsString(), clang::SemaBase::getASTContext(), clang::CallExpr::getBeginLoc(), clang::Stmt::getBeginLoc(), clang::QualType::getCanonicalType(), clang::CallExpr::getDirectCallee(), clang::CallExpr::getNumArgs(), clang::FunctionProtoType::getNumParams(), clang::Type::getPointeeOrArrayElementType(), clang::BlockPointerType::getPointeeType(), clang::Type::getPointeeType(), clang::Expr::getType(), clang::QualType::getUnqualifiedType(), clang::isBlockPointer(), clang::Type::isClkEventT(), clang::Type::isIntegerType(), clang::Expr::isNullPointerConstant(), clang::Type::isPointerType(), clang::Type::isQueueT(), clang::Expr::NPC_ValueDependentIsNotNull, clang::ASTContext::OCLQueueTy, and clang::SemaBase::SemaRef.

◆ checkBuiltinKernelWorkGroupSize()

bool clang::SemaOpenCL::checkBuiltinKernelWorkGroupSize ( CallExpr * TheCall)

OpenCL C v2.0, s6.13.17.6 - Check the argument to the get_kernel_work_group_size and get_kernel_preferred_work_group_size_multiple builtin functions.

Definition at line 178 of file SemaOpenCL.cpp.

References clang::checkBlockArgs(), clang::SemaBase::Diag(), clang::CallExpr::getArg(), clang::Stmt::getBeginLoc(), clang::CallExpr::getDirectCallee(), clang::isBlockPointer(), and clang::SemaBase::SemaRef.

◆ checkBuiltinNDRangeAndBlock()

◆ checkBuiltinPipePackets()

bool clang::SemaOpenCL::checkBuiltinPipePackets ( CallExpr * Call)

Definition at line 525 of file SemaOpenCL.cpp.

References clang::Call, clang::SemaBase::Diag(), and clang::SemaBase::SemaRef.

◆ checkBuiltinReserveRWPipe()

bool clang::SemaOpenCL::checkBuiltinReserveRWPipe ( CallExpr * Call)

◆ checkBuiltinRWPipe()

◆ checkBuiltinToAddr()

◆ checkSubgroupExt()

bool clang::SemaOpenCL::checkSubgroupExt ( CallExpr * Call)

◆ handleAccessAttr()

◆ handleNoSVMAttr()

void clang::SemaOpenCL::handleNoSVMAttr ( Decl * D,
const ParsedAttr & AL )

◆ handleSubGroupSize()


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