clang
19.0.0git
|
#include "clang/Sema/SemaHLSL.h"
Public Member Functions | |
SemaHLSL (Sema &S) | |
Decl * | ActOnStartBuffer (Scope *BufferScope, bool CBuffer, SourceLocation KwLoc, IdentifierInfo *Ident, SourceLocation IdentLoc, SourceLocation LBrace) |
void | ActOnFinishBuffer (Decl *Dcl, SourceLocation RBrace) |
HLSLNumThreadsAttr * | mergeNumThreadsAttr (Decl *D, const AttributeCommonInfo &AL, int X, int Y, int Z) |
HLSLShaderAttr * | mergeShaderAttr (Decl *D, const AttributeCommonInfo &AL, HLSLShaderAttr::ShaderType ShaderType) |
HLSLParamModifierAttr * | mergeParamModifierAttr (Decl *D, const AttributeCommonInfo &AL, HLSLParamModifierAttr::Spelling Spelling) |
void | ActOnTopLevelFunction (FunctionDecl *FD) |
void | CheckEntryPoint (FunctionDecl *FD) |
void | CheckSemanticAnnotation (FunctionDecl *EntryPoint, const Decl *Param, const HLSLAnnotationAttr *AnnotationAttr) |
void | DiagnoseAttrStageMismatch (const Attr *A, HLSLShaderAttr::ShaderType Stage, std::initializer_list< HLSLShaderAttr::ShaderType > AllowedStages) |
![]() | |
SemaBase (Sema &S) | |
ASTContext & | getASTContext () const |
DiagnosticsEngine & | getDiagnostics () const |
const LangOptions & | getLangOpts () const |
void | addFDToReachableFromSyclDevice (const FunctionDecl *Callee, const FunctionDecl *Caller) |
bool | isFDReachableFromSyclDevice (const FunctionDecl *Callee, const FunctionDecl *Caller) |
SemaDiagnosticBuilder | Diag (SourceLocation Loc, unsigned DiagID, bool DeferHint=false) |
Emit a diagnostic. More... | |
SemaDiagnosticBuilder | Diag (SourceLocation Loc, const PartialDiagnostic &PD, bool DeferHint=false) |
Emit a partial diagnostic. More... | |
Additional Inherited Members | |
![]() | |
enum class | DeviceDiagnosticReason { None = 0 , OmpDevice = 1 << 0 , OmpHost = 1 << 1 , OmpAll = OmpDevice | OmpHost , CudaDevice = 1 << 2 , CudaHost = 1 << 3 , CudaAll = CudaDevice | CudaHost , Sycl = 1 << 4 , Esimd = 1 << 5 , All = OmpAll | CudaAll | Sycl | Esimd } |
Bitmask to contain the list of reasons a single diagnostic should be emitted, based on its language. More... | |
![]() | |
Sema & | SemaRef |
Definition at line 29 of file SemaHLSL.h.
SemaHLSL::SemaHLSL | ( | Sema & | S | ) |
Definition at line 25 of file SemaHLSL.cpp.
void SemaHLSL::ActOnFinishBuffer | ( | Decl * | Dcl, |
SourceLocation | RBrace | ||
) |
Definition at line 77 of file SemaHLSL.cpp.
References clang::SemaBase::Diag().
Decl * SemaHLSL::ActOnStartBuffer | ( | Scope * | BufferScope, |
bool | CBuffer, | ||
SourceLocation | KwLoc, | ||
IdentifierInfo * | Ident, | ||
SourceLocation | IdentLoc, | ||
SourceLocation | LBrace | ||
) |
Definition at line 27 of file SemaHLSL.cpp.
References clang::HLSLBufferDecl::Create(), clang::SemaBase::getASTContext(), clang::Sema::getCurLexicalContext(), clang::Sema::PushDeclContext(), clang::Sema::PushOnScopeChains(), and clang::SemaBase::SemaRef.
void SemaHLSL::ActOnTopLevelFunction | ( | FunctionDecl * | FD | ) |
Definition at line 176 of file SemaHLSL.cpp.
References clang::Decl::addAttr(), clang::SemaBase::Diag(), Env, clang::SemaBase::getASTContext(), clang::Decl::getAttr(), clang::DeclaratorDecl::getBeginLoc(), clang::NamedDecl::getName(), clang::ASTContext::getTargetInfo(), clang::TargetInfo::getTargetOpts(), clang::TargetInfo::getTriple(), clang::TargetOptions::HLSLEntry, and clang::Decl::setInvalidDecl().
void SemaHLSL::CheckEntryPoint | ( | FunctionDecl * | FD | ) |
Definition at line 210 of file SemaHLSL.cpp.
References CheckSemanticAnnotation(), clang::SemaBase::Diag(), DiagnoseAttrStageMismatch(), clang::Decl::getAttr(), clang::Decl::getLocation(), clang::Decl::hasAttr(), clang::FunctionDecl::parameters(), and clang::Decl::setInvalidDecl().
void SemaHLSL::CheckSemanticAnnotation | ( | FunctionDecl * | EntryPoint, |
const Decl * | Param, | ||
const HLSLAnnotationAttr * | AnnotationAttr | ||
) |
Definition at line 261 of file SemaHLSL.cpp.
References DiagnoseAttrStageMismatch(), clang::Decl::getAttr(), and clang::Attr::getKind().
Referenced by CheckEntryPoint().
void SemaHLSL::DiagnoseAttrStageMismatch | ( | const Attr * | A, |
HLSLShaderAttr::ShaderType | Stage, | ||
std::initializer_list< HLSLShaderAttr::ShaderType > | AllowedStages | ||
) |
Definition at line 280 of file SemaHLSL.cpp.
References clang::SemaBase::Diag(), and clang::AttributeCommonInfo::getLoc().
Referenced by CheckEntryPoint(), and CheckSemanticAnnotation().
HLSLNumThreadsAttr * SemaHLSL::mergeNumThreadsAttr | ( | Decl * | D, |
const AttributeCommonInfo & | AL, | ||
int | X, | ||
int | Y, | ||
int | Z | ||
) |
Definition at line 128 of file SemaHLSL.cpp.
References clang::SemaBase::Diag(), clang::SemaBase::getASTContext(), clang::Decl::getAttr(), clang::AttributeCommonInfo::getLoc(), and X.
HLSLParamModifierAttr * SemaHLSL::mergeParamModifierAttr | ( | Decl * | D, |
const AttributeCommonInfo & | AL, | ||
HLSLParamModifierAttr::Spelling | Spelling | ||
) |
Definition at line 156 of file SemaHLSL.cpp.
References clang::SemaBase::Diag(), clang::Decl::dropAttr(), clang::SemaBase::getASTContext(), clang::Decl::getAttr(), clang::SourceRange::getEnd(), clang::AttributeCommonInfo::getLoc(), and clang::AttributeCommonInfo::getRange().
HLSLShaderAttr * SemaHLSL::mergeShaderAttr | ( | Decl * | D, |
const AttributeCommonInfo & | AL, | ||
HLSLShaderAttr::ShaderType | ShaderType | ||
) |
Definition at line 143 of file SemaHLSL.cpp.
References clang::SemaBase::Diag(), clang::SemaBase::getASTContext(), clang::Decl::getAttr(), and clang::AttributeCommonInfo::getLoc().