clang 20.0.0git
|
#include "clang/Sema/SemaHLSL.h"
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 30 of file SemaHLSL.cpp.
void SemaHLSL::ActOnFinishBuffer | ( | Decl * | Dcl, |
SourceLocation | RBrace | ||
) |
Definition at line 82 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 32 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 181 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().
Definition at line 1018 of file SemaHLSL.cpp.
References clang::Sema::BuiltinElementwiseTernaryMath(), clang::Sema::BuiltinVectorToScalarMath(), CheckAllArgsHaveFloatRepresentation(), clang::Sema::checkArgCount(), CheckFloatOrHalfRepresentations(), CheckNoDoubleVectors(), CheckUnsignedIntRepresentation(), CheckVectorElementCallArgs(), clang::ActionResult< PtrTy, Compress >::get(), clang::CallExpr::getArg(), clang::Type::getAs(), clang::SemaBase::getASTContext(), clang::Expr::getType(), clang::Type::hasFloatingRepresentation(), clang::Sema::PrepareBuiltinElementwiseMathOneArgCall(), clang::SemaBase::SemaRef, SetElementTypeAsReturnType(), and clang::Expr::setType().
void SemaHLSL::CheckEntryPoint | ( | FunctionDecl * | FD | ) |
Definition at line 214 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 267 of file SemaHLSL.cpp.
References DiagnoseAttrStageMismatch(), clang::Decl::getAttr(), and clang::Attr::getKind().
Referenced by CheckEntryPoint().
void SemaHLSL::DiagnoseAttrStageMismatch | ( | const Attr * | A, |
llvm::Triple::EnvironmentType | Stage, | ||
std::initializer_list< llvm::Triple::EnvironmentType > | AllowedStages | ||
) |
Definition at line 286 of file SemaHLSL.cpp.
References clang::SemaBase::Diag(), and clang::AttributeCommonInfo::getLoc().
Referenced by CheckEntryPoint(), and CheckSemanticAnnotation().
void SemaHLSL::DiagnoseAvailabilityViolations | ( | TranslationUnitDecl * | TU | ) |
Definition at line 887 of file SemaHLSL.cpp.
References clang::Sema::getASTContext(), clang::Sema::getLangOpts(), clang::ASTContext::getTargetInfo(), clang::TargetInfo::getTriple(), and clang::SemaBase::SemaRef.
Referenced by clang::Sema::ActOnEndOfTranslationUnit().
void SemaHLSL::handleNumThreadsAttr | ( | Decl * | D, |
const ParsedAttr & | AL | ||
) |
Definition at line 300 of file SemaHLSL.cpp.
References clang::Decl::addAttr(), clang::Sema::checkUInt32Argument(), D, clang::SemaBase::Diag(), clang::ParsedAttr::getArgAsExpr(), clang::SemaBase::getASTContext(), clang::Expr::getExprLoc(), clang::AttributeCommonInfo::getLoc(), clang::ASTContext::getTargetInfo(), clang::TargetInfo::getTriple(), mergeNumThreadsAttr(), clang::SemaBase::SemaRef, and X.
Referenced by ProcessDeclAttribute().
void SemaHLSL::handlePackOffsetAttr | ( | Decl * | D, |
const ParsedAttr & | AL | ||
) |
Definition at line 371 of file SemaHLSL.cpp.
References clang::Decl::addAttr(), clang::Sema::checkUInt32Argument(), D, clang::SemaBase::Diag(), clang::ParsedAttr::getArgAsExpr(), clang::Type::getAs(), clang::SemaBase::getASTContext(), clang::Decl::getDeclContext(), clang::AttributeCommonInfo::getLoc(), clang::ASTContext::getTypeAlign(), clang::ASTContext::getTypeSize(), clang::Type::isArrayType(), clang::Type::isStructureType(), clang::SemaBase::SemaRef, and clang::T.
Referenced by ProcessDeclAttribute().
void SemaHLSL::handleParamModifierAttr | ( | Decl * | D, |
const ParsedAttr & | AL | ||
) |
Definition at line 533 of file SemaHLSL.cpp.
References clang::Decl::addAttr(), D, clang::ParsedAttr::getSemanticSpelling(), and mergeParamModifierAttr().
Referenced by ProcessDeclAttribute().
void SemaHLSL::handleResourceBindingAttr | ( | Decl * | D, |
const ParsedAttr & | AL | ||
) |
Definition at line 462 of file SemaHLSL.cpp.
References clang::AANT_ArgumentIdentifier, clang::Decl::addAttr(), D, clang::SemaBase::Diag(), clang::ParsedAttr::getArgAsIdent(), clang::SemaBase::getASTContext(), clang::AttributeCommonInfo::getLoc(), clang::ParsedAttr::getNumArgs(), clang::ParsedAttr::isArgIdent(), and Loc.
Referenced by ProcessDeclAttribute().
void SemaHLSL::handleResourceClassAttr | ( | Decl * | D, |
const ParsedAttr & | AL | ||
) |
Definition at line 440 of file SemaHLSL.cpp.
References clang::AANT_ArgumentIdentifier, clang::Decl::addAttr(), D, clang::SemaBase::Diag(), clang::ParsedAttr::getArgAsIdent(), clang::SemaBase::getASTContext(), clang::AttributeCommonInfo::getLoc(), Identifier, clang::ParsedAttr::isArgIdent(), and Loc.
Referenced by ProcessDeclAttribute().
void clang::SemaHLSL::handleROVAttr | ( | Decl * | D, |
const ParsedAttr & | AL | ||
) |
void SemaHLSL::handleShaderAttr | ( | Decl * | D, |
const ParsedAttr & | AL | ||
) |
Definition at line 420 of file SemaHLSL.cpp.
References clang::Decl::addAttr(), clang::Sema::checkStringLiteralArgumentAttr(), D, clang::SemaBase::Diag(), clang::AttributeCommonInfo::getLoc(), mergeShaderAttr(), and clang::SemaBase::SemaRef.
Referenced by ProcessDeclAttribute().
void SemaHLSL::handleSV_DispatchThreadIDAttr | ( | Decl * | D, |
const ParsedAttr & | AL | ||
) |
Definition at line 359 of file SemaHLSL.cpp.
References clang::Decl::addAttr(), D, clang::SemaBase::Diag(), clang::SemaBase::getASTContext(), clang::AttributeCommonInfo::getLoc(), and isLegalTypeForHLSLSV_DispatchThreadID().
Referenced by ProcessDeclAttribute().
HLSLNumThreadsAttr * SemaHLSL::mergeNumThreadsAttr | ( | Decl * | D, |
const AttributeCommonInfo & | AL, | ||
int | X, | ||
int | Y, | ||
int | Z | ||
) |
Definition at line 133 of file SemaHLSL.cpp.
References D, clang::SemaBase::Diag(), clang::SemaBase::getASTContext(), clang::Decl::getAttr(), clang::AttributeCommonInfo::getLoc(), and X.
Referenced by handleNumThreadsAttr(), and mergeDeclAttribute().
HLSLParamModifierAttr * SemaHLSL::mergeParamModifierAttr | ( | Decl * | D, |
const AttributeCommonInfo & | AL, | ||
HLSLParamModifierAttr::Spelling | Spelling | ||
) |
Definition at line 161 of file SemaHLSL.cpp.
References D, clang::SemaBase::Diag(), clang::Decl::dropAttr(), clang::SemaBase::getASTContext(), clang::Decl::getAttr(), clang::SourceRange::getEnd(), clang::AttributeCommonInfo::getLoc(), and clang::AttributeCommonInfo::getRange().
Referenced by handleParamModifierAttr().
HLSLShaderAttr * SemaHLSL::mergeShaderAttr | ( | Decl * | D, |
const AttributeCommonInfo & | AL, | ||
llvm::Triple::EnvironmentType | ShaderType | ||
) |
Definition at line 148 of file SemaHLSL.cpp.
References D, clang::SemaBase::Diag(), clang::SemaBase::getASTContext(), clang::Decl::getAttr(), and clang::AttributeCommonInfo::getLoc().
Referenced by handleShaderAttr(), and mergeDeclAttribute().