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) |
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. | |
Additional Inherited Members | |
Public Attributes inherited from clang::SemaBase | |
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 Begin, calculateLegacyCbufferSize(), clang::SemaBase::Diag(), clang::SemaBase::getASTContext(), clang::Decl::getLocation(), clang::ValueDecl::getType(), clang::Sema::PopDeclContext(), and clang::SemaBase::SemaRef.
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(), clang::Result, 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().
Referenced by clang::Sema::ActOnFunctionDeclarator().
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().
Referenced by clang::Sema::ActOnFunctionDeclarator().
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.
Referenced by handleHLSLNumThreadsAttr(), and mergeDeclAttribute().
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().
Referenced by handleHLSLParamModifierAttr().
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().
Referenced by handleHLSLShaderAttr(), and mergeDeclAttribute().