clang 22.0.0git
clang::SemaHLSL Class Reference

#include "clang/Sema/SemaHLSL.h"

Inheritance diagram for clang::SemaHLSL:
[legend]

Public Member Functions

 SemaHLSL (Sema &S)
DeclActOnStartBuffer (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)
HLSLWaveSizeAttr * mergeWaveSizeAttr (Decl *D, const AttributeCommonInfo &AL, int Min, int Max, int Preferred, int SpelledArgsCount)
HLSLVkConstantIdAttr * mergeVkConstantIdAttr (Decl *D, const AttributeCommonInfo &AL, int Id)
HLSLShaderAttr * mergeShaderAttr (Decl *D, const AttributeCommonInfo &AL, llvm::Triple::EnvironmentType ShaderType)
HLSLParamModifierAttr * mergeParamModifierAttr (Decl *D, const AttributeCommonInfo &AL, HLSLParamModifierAttr::Spelling Spelling)
void ActOnTopLevelFunction (FunctionDecl *FD)
void ActOnVariableDeclarator (VarDecl *VD)
bool ActOnUninitializedVarDecl (VarDecl *D)
void ActOnEndOfTranslationUnit (TranslationUnitDecl *TU)
void CheckEntryPoint (FunctionDecl *FD)
bool isSemanticValid (FunctionDecl *FD, DeclaratorDecl *D)
void CheckSemanticAnnotation (FunctionDecl *EntryPoint, const Decl *Param, const HLSLAnnotationAttr *AnnotationAttr)
bool CheckResourceBinOp (BinaryOperatorKind Opc, Expr *LHSExpr, Expr *RHSExpr, SourceLocation Loc)
void DiagnoseAttrStageMismatch (const Attr *A, llvm::Triple::EnvironmentType Stage, std::initializer_list< llvm::Triple::EnvironmentType > AllowedStages)
QualType handleVectorBinOpConversion (ExprResult &LHS, ExprResult &RHS, QualType LHSType, QualType RHSType, bool IsCompAssign)
void emitLogicalOperatorFixIt (Expr *LHS, Expr *RHS, BinaryOperatorKind Opc)
std::pair< IdentifierInfo *, boolActOnStartRootSignatureDecl (StringRef Signature)
 Computes the unique Root Signature identifier from the given signature, then lookup if there is a previousy created Root Signature decl.
void ActOnFinishRootSignatureDecl (SourceLocation Loc, IdentifierInfo *DeclIdent, ArrayRef< hlsl::RootSignatureElement > Elements)
 Creates the Root Signature decl of the parsed Root Signature elements onto the AST and push it onto current Scope.
void SetRootSignatureOverride (IdentifierInfo *DeclIdent)
HLSLRootSignatureDecllookupRootSignatureOverrideDecl (DeclContext *DC) const
bool handleRootSignatureElements (ArrayRef< hlsl::RootSignatureElement > Elements)
void handleRootSignatureAttr (Decl *D, const ParsedAttr &AL)
void handleNumThreadsAttr (Decl *D, const ParsedAttr &AL)
void handleWaveSizeAttr (Decl *D, const ParsedAttr &AL)
void handleVkConstantIdAttr (Decl *D, const ParsedAttr &AL)
void handleVkBindingAttr (Decl *D, const ParsedAttr &AL)
void handlePackOffsetAttr (Decl *D, const ParsedAttr &AL)
void handleShaderAttr (Decl *D, const ParsedAttr &AL)
void handleResourceBindingAttr (Decl *D, const ParsedAttr &AL)
void handleParamModifierAttr (Decl *D, const ParsedAttr &AL)
bool handleResourceTypeAttr (QualType T, const ParsedAttr &AL)
template<typename T>
TcreateSemanticAttr (const ParsedAttr &AL, std::optional< unsigned > Location)
void diagnoseSystemSemanticAttr (Decl *D, const ParsedAttr &AL, std::optional< unsigned > Index)
void handleSemanticAttr (Decl *D, const ParsedAttr &AL)
void handleVkExtBuiltinInputAttr (Decl *D, const ParsedAttr &AL)
bool CheckBuiltinFunctionCall (unsigned BuiltinID, CallExpr *TheCall)
QualType ProcessResourceTypeAttributes (QualType Wrapped)
HLSLAttributedResourceLocInfo TakeLocForHLSLAttribute (const HLSLAttributedResourceType *RT)
bool IsScalarizedLayoutCompatible (QualType T1, QualType T2) const
bool IsTypedResourceElementCompatible (QualType T1)
bool CheckCompatibleParameterABI (FunctionDecl *New, FunctionDecl *Old)
bool diagnoseInputIDType (QualType T, const ParsedAttr &AL)
bool diagnosePositionType (QualType T, const ParsedAttr &AL)
bool CanPerformScalarCast (QualType SrcTy, QualType DestTy)
bool ContainsBitField (QualType BaseTy)
bool CanPerformElementwiseCast (Expr *Src, QualType DestType)
bool CanPerformAggregateSplatCast (Expr *Src, QualType DestType)
ExprResult ActOnOutParamExpr (ParmVarDecl *Param, Expr *Arg)
QualType getInoutParameterType (QualType Ty)
bool transformInitList (const InitializedEntity &Entity, InitListExpr *Init)
bool handleInitialization (VarDecl *VDecl, Expr *&Init)
void deduceAddressSpace (VarDecl *Decl)
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 107 of file SemaHLSL.h.

Constructor & Destructor Documentation

◆ SemaHLSL()

SemaHLSL::SemaHLSL ( Sema & S)

Definition at line 195 of file SemaHLSL.cpp.

References clang::SemaBase::SemaBase().

Member Function Documentation

◆ ActOnEndOfTranslationUnit()

◆ ActOnFinishBuffer()

◆ ActOnFinishRootSignatureDecl()

void SemaHLSL::ActOnFinishRootSignatureDecl ( SourceLocation Loc,
IdentifierInfo * DeclIdent,
ArrayRef< hlsl::RootSignatureElement > Elements )

Creates the Root Signature decl of the parsed Root Signature elements onto the AST and push it onto current Scope.

Definition at line 1107 of file SemaHLSL.cpp.

References clang::HLSLRootSignatureDecl::Create(), handleRootSignatureElements(), and clang::SemaBase::SemaRef.

Referenced by clang::hlsl::ParseHLSLRootSignature().

◆ ActOnOutParamExpr()

◆ ActOnStartBuffer()

Decl * SemaHLSL::ActOnStartBuffer ( Scope * BufferScope,
bool CBuffer,
SourceLocation KwLoc,
IdentifierInfo * Ident,
SourceLocation IdentLoc,
SourceLocation LBrace )

◆ ActOnStartRootSignatureDecl()

std::pair< IdentifierInfo *, bool > SemaHLSL::ActOnStartRootSignatureDecl ( StringRef Signature)

Computes the unique Root Signature identifier from the given signature, then lookup if there is a previousy created Root Signature decl.

Returns the identifier and if it was found

Definition at line 1095 of file SemaHLSL.cpp.

References clang::Found, clang::IdentifierTable::get(), clang::SemaBase::getASTContext(), llvm::hash_value(), clang::ASTContext::Idents, clang::Sema::LookupOrdinaryName, and clang::SemaBase::SemaRef.

Referenced by clang::hlsl::ParseHLSLRootSignature().

◆ ActOnTopLevelFunction()

◆ ActOnUninitializedVarDecl()

◆ ActOnVariableDeclarator()

◆ CanPerformAggregateSplatCast()

◆ CanPerformElementwiseCast()

bool SemaHLSL::CanPerformElementwiseCast ( Expr * Src,
QualType DestType )

◆ CanPerformScalarCast()

◆ CheckBuiltinFunctionCall()

◆ CheckCompatibleParameterABI()

◆ CheckEntryPoint()

◆ CheckResourceBinOp()

◆ CheckSemanticAnnotation()

void SemaHLSL::CheckSemanticAnnotation ( FunctionDecl * EntryPoint,
const Decl * Param,
const HLSLAnnotationAttr * AnnotationAttr )

◆ ContainsBitField()

◆ createSemanticAttr()

template<typename T>
T * clang::SemaHLSL::createSemanticAttr ( const ParsedAttr & AL,
std::optional< unsigned > Location )
inline

◆ deduceAddressSpace()

◆ DiagnoseAttrStageMismatch()

void SemaHLSL::DiagnoseAttrStageMismatch ( const Attr * A,
llvm::Triple::EnvironmentType Stage,
std::initializer_list< llvm::Triple::EnvironmentType > AllowedStages )

◆ diagnoseInputIDType()

bool SemaHLSL::diagnoseInputIDType ( QualType T,
const ParsedAttr & AL )

◆ diagnosePositionType()

bool SemaHLSL::diagnosePositionType ( QualType T,
const ParsedAttr & AL )

◆ diagnoseSystemSemanticAttr()

◆ emitLogicalOperatorFixIt()

◆ getInoutParameterType()

◆ handleInitialization()

◆ handleNumThreadsAttr()

◆ handlePackOffsetAttr()

◆ handleParamModifierAttr()

void SemaHLSL::handleParamModifierAttr ( Decl * D,
const ParsedAttr & AL )

◆ handleResourceBindingAttr()

◆ handleResourceTypeAttr()

◆ handleRootSignatureAttr()

◆ handleRootSignatureElements()

◆ handleSemanticAttr()

◆ handleShaderAttr()

void SemaHLSL::handleShaderAttr ( Decl * D,
const ParsedAttr & AL )

◆ handleVectorBinOpConversion()

◆ handleVkBindingAttr()

◆ handleVkConstantIdAttr()

void SemaHLSL::handleVkConstantIdAttr ( Decl * D,
const ParsedAttr & AL )

◆ handleVkExtBuiltinInputAttr()

void SemaHLSL::handleVkExtBuiltinInputAttr ( Decl * D,
const ParsedAttr & AL )

◆ handleWaveSizeAttr()

◆ IsScalarizedLayoutCompatible()

◆ isSemanticValid()

◆ IsTypedResourceElementCompatible()

◆ lookupRootSignatureOverrideDecl()

HLSLRootSignatureDecl * SemaHLSL::lookupRootSignatureOverrideDecl ( DeclContext * DC) const

◆ mergeNumThreadsAttr()

HLSLNumThreadsAttr * SemaHLSL::mergeNumThreadsAttr ( Decl * D,
const AttributeCommonInfo & AL,
int X,
int Y,
int Z )

◆ mergeParamModifierAttr()

HLSLParamModifierAttr * SemaHLSL::mergeParamModifierAttr ( Decl * D,
const AttributeCommonInfo & AL,
HLSLParamModifierAttr::Spelling Spelling )

◆ mergeShaderAttr()

HLSLShaderAttr * SemaHLSL::mergeShaderAttr ( Decl * D,
const AttributeCommonInfo & AL,
llvm::Triple::EnvironmentType ShaderType )

◆ mergeVkConstantIdAttr()

◆ mergeWaveSizeAttr()

HLSLWaveSizeAttr * SemaHLSL::mergeWaveSizeAttr ( Decl * D,
const AttributeCommonInfo & AL,
int Min,
int Max,
int Preferred,
int SpelledArgsCount )

◆ ProcessResourceTypeAttributes()

QualType SemaHLSL::ProcessResourceTypeAttributes ( QualType Wrapped)

◆ SetRootSignatureOverride()

void clang::SemaHLSL::SetRootSignatureOverride ( IdentifierInfo * DeclIdent)
inline

Definition at line 160 of file SemaHLSL.h.

◆ TakeLocForHLSLAttribute()

HLSLAttributedResourceLocInfo SemaHLSL::TakeLocForHLSLAttribute ( const HLSLAttributedResourceType * RT)

Definition at line 1954 of file SemaHLSL.cpp.

References clang::HLSLAttributedResourceLocInfo::Range.

◆ transformInitList()


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