25#include "llvm/ADT/SmallVector.h"
27using namespace llvm::hlsl;
35static FunctionDecl *lookupBuiltinFunction(Sema &S, StringRef Name) {
37 S.getASTContext().Idents.get(Name, tok::TokenKind::identifier);
38 DeclarationNameInfo NameInfo =
39 DeclarationNameInfo(DeclarationName(&II), SourceLocation());
43 S.LookupName(R, S.getCurScope());
46 assert(R.isSingleResult() &&
47 "Since this is a builtin it should always resolve!");
48 return cast<FunctionDecl>(R.getFoundDecl());
99 HLSLParamModifierAttr::Spelling Modifier;
101 HLSLParamModifierAttr::Spelling Modifier)
102 : NameII(NameII), Ty(Ty), Modifier(Modifier) {}
123 enum class PlaceHolder { _0, _1,
_2, _3, _4, Handle = 128, LastStmt };
125 Expr *convertPlaceholder(PlaceHolder PH);
126 Expr *convertPlaceholder(
Expr *
E) {
return E; }
132 QualType ReturnTy,
bool IsConst =
false,
134 : DeclBuilder(DB), Name(Name), ReturnTy(ReturnTy),
Method(nullptr),
135 IsConst(IsConst), IsCtor(IsCtor) {}
138 QualType ReturnTy,
bool IsConst =
false,
139 bool IsCtor =
false);
148 HLSLParamModifierAttr::Spelling Modifier =
149 HLSLParamModifierAttr::Keyword_in);
150 template <
typename... Ts>
152 QualType ReturnType, Ts... ArgSpecs);
153 template <
typename TLHS,
typename TRHS>
164 void ensureCompleteDecl() {
178 "record is already complete");
180 unsigned Position =
static_cast<unsigned>(
Params.size());
184 &AST.
Idents.
get(Name, tok::TokenKind::identifier),
188 if (!DefaultValue.
isNull())
189 Decl->setDefaultArgument(AST,
232 "unexpected concept decl parameter count");
251 T->setDeclContext(DC);
253 QualType ConceptTType = Context.getTypeDeclType(ConceptTTPD);
259 QualType CSETType = Context.getTypeDeclType(
T);
319Expr *BuiltinTypeMethodBuilder::convertPlaceholder(PlaceHolder PH) {
320 if (PH == PlaceHolder::Handle)
323 if (PH == PlaceHolder::LastStmt) {
324 assert(!StmtsList.empty() &&
"no statements in the list");
325 Stmt *LastStmt = StmtsList.pop_back_val();
326 assert(isa<ValueStmt>(LastStmt) &&
"last statement does not have a value");
327 return cast<ValueStmt>(LastStmt)->getExprStmt();
341 bool IsConst,
bool IsCtor)
342 : DeclBuilder(DB), ReturnTy(ReturnTy),
Method(nullptr), IsConst(IsConst),
345 assert((!NameStr.empty() || IsCtor) &&
"method needs a name");
346 assert(((IsCtor && !IsConst) || !IsCtor) &&
"constructor cannot be const");
354 AST.
Idents.
get(NameStr, tok::TokenKind::identifier);
361 HLSLParamModifierAttr::Spelling Modifier) {
362 assert(
Method ==
nullptr &&
"Cannot add param, method already created");
364 Name, tok::TokenKind::identifier);
365 Params.emplace_back(II, Ty, Modifier);
369void BuiltinTypeMethodBuilder::createDecl() {
370 assert(Method ==
nullptr &&
"Method or constructor is already created");
375 for (Param &MP : Params)
376 ParamTypes.emplace_back(MP.Ty);
389 AST, DeclBuilder.Record,
SourceLocation(), NameInfo, FuncTy, TSInfo,
395 NameInfo, FuncTy, TSInfo,
SC_None,
false,
false,
403 for (
int I = 0,
E = Params.size(); I !=
E; I++) {
404 Param &MP = Params[I];
410 if (MP.Modifier != HLSLParamModifierAttr::Keyword_in) {
412 HLSLParamModifierAttr::Create(AST,
SourceRange(), MP.Modifier);
416 ParmDecls.push_back(Parm);
417 FnProtoLoc.setParam(I, Parm);
419 Method->setParams({ParmDecls});
423 ensureCompleteDecl();
428 FieldDecl *HandleField = DeclBuilder.getResourceHandleField();
434template <
typename... Ts>
437 QualType ReturnType, Ts... ArgSpecs) {
438 std::array<
Expr *,
sizeof...(ArgSpecs)> Args{
439 convertPlaceholder(std::forward<Ts>(ArgSpecs))...};
441 ensureCompleteDecl();
444 FunctionDecl *FD = lookupBuiltinFunction(DeclBuilder.SemaRef, BuiltinName);
458 StmtsList.push_back(
Call);
462template <
typename TLHS,
typename TRHS>
464 Expr *LHSExpr = convertPlaceholder(LHS);
465 Expr *RHSExpr = convertPlaceholder(RHS);
467 DeclBuilder.SemaRef.
getASTContext(), LHSExpr, RHSExpr, BO_Assign,
470 StmtsList.push_back(AssignStmt);
476 Expr *PtrExpr = convertPlaceholder(Ptr);
482 StmtsList.push_back(Deref);
488 "record is already complete");
490 ensureCompleteDecl();
494 assert((ReturnTy == AST.
VoidTy || !StmtsList.empty()) &&
495 "nothing to return from non-void method");
496 if (ReturnTy != AST.
VoidTy) {
497 if (
Expr *LastExpr = dyn_cast<Expr>(StmtsList.back())) {
500 "Return type of the last statement must match the return type "
502 if (!isa<ReturnStmt>(LastExpr)) {
503 StmtsList.pop_back();
512 Method->setLexicalDeclContext(DeclBuilder.Record);
514 Method->addAttr(AlwaysInlineAttr::CreateImplicit(
515 AST,
SourceRange(), AlwaysInlineAttr::CXX11_clang_always_inline));
522 : SemaRef(SemaRef),
Record(R) {
523 Record->startDefinition();
524 Template =
Record->getDescribedClassTemplate();
530 : SemaRef(SemaRef), HLSLNamespace(Namespace) {
539 if (
auto *TD = dyn_cast<ClassTemplateDecl>(
Found)) {
540 PrevDecl = TD->getTemplatedDecl();
543 PrevDecl = dyn_cast<CXXRecordDecl>(
Found);
544 assert(PrevDecl &&
"Unexpected lookup result type.");
549 Template = PrevTemplate;
556 Record->setImplicit(
true);
557 Record->setLexicalDeclContext(HLSLNamespace);
558 Record->setHasExternalLexicalStorage();
562 FinalAttr::CreateImplicit(AST,
SourceRange(), FinalAttr::Keyword_final));
574 assert(!
Record->isCompleteDefinition() &&
"record is already complete");
575 assert(
Record->isBeingDefined() &&
576 "Definition must be started before adding members!");
585 Field->setAccess(Access);
586 Field->setImplicit(
true);
587 for (
Attr *A : Attrs) {
593 Fields[Name] = Field;
599 assert(!
Record->isCompleteDefinition() &&
"record is already complete");
603 Ctx.getTrivialTypeSourceInfo(getHandleElementType(),
SourceLocation());
608 HLSLResourceClassAttr::CreateImplicit(Ctx, RC),
609 IsROV ? HLSLROVAttr::CreateImplicit(Ctx) :
nullptr,
610 RawBuffer ? HLSLRawBufferAttr::CreateImplicit(Ctx) :
nullptr,
612 ? HLSLContainedTypeAttr::CreateImplicit(Ctx, ElementTypeInfo)
623 if (
Record->isCompleteDefinition())
626 using PH = BuiltinTypeMethodBuilder::PlaceHolder;
630 .callBuiltin(
"__builtin_hlsl_resource_uninitializedhandle", HandleType,
632 .assign(PH::Handle, PH::LastStmt)
638 if (
Record->isCompleteDefinition())
641 using PH = BuiltinTypeMethodBuilder::PlaceHolder;
648 .addParam(
"range", AST.
IntTy)
651 .callBuiltin(
"__builtin_hlsl_resource_handlefrombinding", HandleType,
652 PH::Handle, PH::_0, PH::_1, PH::_2, PH::_3, PH::_4)
653 .assign(PH::Handle, PH::LastStmt)
659 if (
Record->isCompleteDefinition())
662 using PH = BuiltinTypeMethodBuilder::PlaceHolder;
668 .addParam(
"range", AST.
IntTy)
672 .callBuiltin(
"__builtin_hlsl_resource_handlefromimplicitbinding",
673 HandleType, PH::Handle, PH::_0, PH::_1, PH::_2, PH::_3,
675 .assign(PH::Handle, PH::LastStmt)
685 if (getResourceAttrs().
ResourceClass == llvm::dxil::ResourceClass::UAV)
692 if (
Record->isCompleteDefinition())
704FieldDecl *BuiltinTypeDeclBuilder::getResourceHandleField()
const {
705 auto I = Fields.find(
"__handle");
706 assert(I != Fields.end() &&
707 I->second->getType()->isHLSLAttributedResourceType() &&
708 "record does not have resource handle field");
712QualType BuiltinTypeDeclBuilder::getFirstTemplateTypeParam() {
713 assert(Template &&
"record it not a template");
714 if (
const auto *TTD = dyn_cast<TemplateTypeParmDecl>(
716 return QualType(TTD->getTypeForDecl(), 0);
721QualType BuiltinTypeDeclBuilder::getHandleElementType() {
723 return getFirstTemplateTypeParam();
728HLSLAttributedResourceType::Attributes
729BuiltinTypeDeclBuilder::getResourceAttrs()
const {
730 QualType HandleType = getResourceHandleField()->
getType();
731 return cast<HLSLAttributedResourceType>(HandleType)->getAttrs();
741 assert(!
Record->isCompleteDefinition() &&
"record is already complete");
742 assert(
Record->isBeingDefined() &&
743 "Definition must be started before completing it.");
745 Record->completeDefinition();
749Expr *BuiltinTypeDeclBuilder::getConstantIntExpr(
int value) {
756BuiltinTypeDeclBuilder &
759 if (
Record->isCompleteDefinition()) {
760 assert(Template &&
"existing record it not a template");
762 "template param count mismatch");
767 for (StringRef Name : Names)
768 Builder.addTypeParameter(Name);
769 return Builder.finalizeTemplateArgs(CD);
773 using PH = BuiltinTypeMethodBuilder::PlaceHolder;
776 .callBuiltin(
"__builtin_hlsl_buffer_update_counter",
QualType(),
777 PH::Handle, getConstantIntExpr(1))
782 using PH = BuiltinTypeMethodBuilder::PlaceHolder;
785 .callBuiltin(
"__builtin_hlsl_buffer_update_counter",
QualType(),
786 PH::Handle, getConstantIntExpr(-1))
792 bool IsConst,
bool IsRef) {
793 assert(!
Record->isCompleteDefinition() &&
"record is already complete");
795 using PH = BuiltinTypeMethodBuilder::PlaceHolder;
797 QualType ElemTy = getHandleElementType();
804 ReturnTy = AddrSpaceElemTy;
816 .callBuiltin(
"__builtin_hlsl_resource_getpointer", ElemPtrTy, PH::Handle,
818 .dereference(PH::LastStmt)
823 using PH = BuiltinTypeMethodBuilder::PlaceHolder;
825 QualType ElemTy = getHandleElementType();
829 .addParam(
"value", ElemTy)
830 .callBuiltin(
"__builtin_hlsl_buffer_update_counter", AST.
UnsignedIntTy,
831 PH::Handle, getConstantIntExpr(1))
832 .callBuiltin(
"__builtin_hlsl_resource_getpointer",
835 .dereference(PH::LastStmt)
836 .assign(PH::LastStmt, PH::_0)
841 using PH = BuiltinTypeMethodBuilder::PlaceHolder;
843 QualType ElemTy = getHandleElementType();
847 .callBuiltin(
"__builtin_hlsl_buffer_update_counter", AST.
UnsignedIntTy,
848 PH::Handle, getConstantIntExpr(-1))
849 .callBuiltin(
"__builtin_hlsl_resource_getpointer",
852 .dereference(PH::LastStmt)
Defines the clang::ASTContext interface.
llvm::dxil::ResourceClass ResourceClass
Defines the C++ Decl subclasses, other than those for templates (found in DeclTemplate....
llvm::MachO::Record Record
This file declares semantic analysis for HLSL constructs.
Defines the clang::SourceLocation class and associated facilities.
C Language Family Type Representation.
a trap message and trap category.
Holds long-lived AST nodes (such as types and decls) that can be referred to throughout the semantic ...
DeclarationNameTable DeclarationNames
QualType getPointerType(QualType T) const
Return the uniqued reference to the type for a pointer to the specified type.
QualType getLValueReferenceType(QualType T, bool SpelledAsLValue=true) const
Return the uniqued reference to the type for an lvalue reference to the specified type.
TypeSourceInfo * getTrivialTypeSourceInfo(QualType T, SourceLocation Loc=SourceLocation()) const
Allocate a TypeSourceInfo where all locations have been initialized to a given location,...
bool hasSameUnqualifiedType(QualType T1, QualType T2) const
Determine whether the given types are equivalent after cvr-qualifiers have been removed.
uint64_t getTypeSize(QualType T) const
Return the size of the specified (complete) type T, in bits.
CanQualType UnsignedIntTy
QualType getFunctionType(QualType ResultTy, ArrayRef< QualType > Args, const FunctionProtoType::ExtProtoInfo &EPI) const
Return a normal function type with a typed argument list.
QualType getAddrSpaceQualType(QualType T, LangAS AddressSpace) const
Return the uniqued reference to the type for an address space qualified type with the specified type ...
CanQualType getCanonicalTagType(const TagDecl *TD) const
Attr - This represents one attribute.
static BinaryOperator * Create(const ASTContext &C, Expr *lhs, Expr *rhs, Opcode opc, QualType ResTy, ExprValueKind VK, ExprObjectKind OK, SourceLocation opLoc, FPOptionsOverride FPFeatures)
static CXXConstructorDecl * Create(ASTContext &C, CXXRecordDecl *RD, SourceLocation StartLoc, const DeclarationNameInfo &NameInfo, QualType T, TypeSourceInfo *TInfo, ExplicitSpecifier ES, bool UsesFPIntrin, bool isInline, bool isImplicitlyDeclared, ConstexprSpecKind ConstexprKind, InheritedConstructor Inherited=InheritedConstructor(), const AssociatedConstraint &TrailingRequiresClause={})
Represents a static or instance method of a struct/union/class.
static CXXMethodDecl * Create(ASTContext &C, CXXRecordDecl *RD, SourceLocation StartLoc, const DeclarationNameInfo &NameInfo, QualType T, TypeSourceInfo *TInfo, StorageClass SC, bool UsesFPIntrin, bool isInline, ConstexprSpecKind ConstexprKind, SourceLocation EndLocation, const AssociatedConstraint &TrailingRequiresClause={})
Represents a C++ struct/union/class.
static CXXRecordDecl * Create(const ASTContext &C, TagKind TK, DeclContext *DC, SourceLocation StartLoc, SourceLocation IdLoc, IdentifierInfo *Id, CXXRecordDecl *PrevDecl=nullptr)
void setDescribedClassTemplate(ClassTemplateDecl *Template)
Represents the this expression in C++.
static CXXThisExpr * Create(const ASTContext &Ctx, SourceLocation L, QualType Ty, bool IsImplicit)
static CallExpr * Create(const ASTContext &Ctx, Expr *Fn, ArrayRef< Expr * > Args, QualType Ty, ExprValueKind VK, SourceLocation RParenLoc, FPOptionsOverride FPFeatures, unsigned MinNumArgs=0, ADLCallKind UsesADL=NotADL)
Create a call expression.
QualType withConst() const
Retrieves a version of this type with const applied.
static ClassTemplateDecl * Create(ASTContext &C, DeclContext *DC, SourceLocation L, DeclarationName Name, TemplateParameterList *Params, NamedDecl *Decl)
Create a class template node.
static CompoundStmt * Create(const ASTContext &C, ArrayRef< Stmt * > Stmts, FPOptionsOverride FPFeatures, SourceLocation LB, SourceLocation RB)
Declaration of a C++20 concept.
A reference to a concept and its template args, as it appears in the code.
static ConceptReference * Create(const ASTContext &C, NestedNameSpecifierLoc NNS, SourceLocation TemplateKWLoc, DeclarationNameInfo ConceptNameInfo, NamedDecl *FoundDecl, TemplateDecl *NamedConcept, const ASTTemplateArgumentListInfo *ArgsAsWritten)
Represents the specialization of a concept - evaluates to a prvalue of type bool.
static ConceptSpecializationExpr * Create(const ASTContext &C, ConceptReference *ConceptRef, ImplicitConceptSpecializationDecl *SpecDecl, const ConstraintSatisfaction *Satisfaction)
The result of a constraint satisfaction check, containing the necessary information to diagnose an un...
DeclContext - This is used only as base class of specific decl types that can act as declaration cont...
void addDecl(Decl *D)
Add the declaration D into this context.
A reference to a declared variable, function, enum, etc.
static DeclRefExpr * Create(const ASTContext &Context, NestedNameSpecifierLoc QualifierLoc, SourceLocation TemplateKWLoc, ValueDecl *D, bool RefersToEnclosingVariableOrCapture, SourceLocation NameLoc, QualType T, ExprValueKind VK, NamedDecl *FoundD=nullptr, const TemplateArgumentListInfo *TemplateArgs=nullptr, NonOdrUseReason NOUR=NOUR_None)
Decl - This represents one declaration (or definition), e.g.
void setImplicit(bool I=true)
DeclContext * getDeclContext()
void setLexicalDeclContext(DeclContext *DC)
The name of a declaration.
Store information needed for an explicit specifier.
This represents one expression.
Represents difference between two FPOptions values.
Represents a member of a struct/union/class.
static FieldDecl * Create(const ASTContext &C, DeclContext *DC, SourceLocation StartLoc, SourceLocation IdLoc, const IdentifierInfo *Id, QualType T, TypeSourceInfo *TInfo, Expr *BW, bool Mutable, InClassInitStyle InitStyle)
Represents a function declaration or definition.
QualType getReturnType() const
DeclarationNameInfo getNameInfo() const
One of these records is kept for each identifier that is lexed.
IdentifierInfo & get(StringRef Name)
Return the identifier token info for the specified named identifier.
static ImplicitCastExpr * Create(const ASTContext &Context, QualType T, CastKind Kind, Expr *Operand, const CXXCastPath *BasePath, ExprValueKind Cat, FPOptionsOverride FPO)
static ImplicitConceptSpecializationDecl * Create(const ASTContext &C, DeclContext *DC, SourceLocation SL, ArrayRef< TemplateArgument > ConvertedArgs)
static IntegerLiteral * Create(const ASTContext &C, const llvm::APInt &V, QualType type, SourceLocation l)
Returns a new integer literal with value 'V' and type 'type'.
Represents the results of name lookup.
static MemberExpr * CreateImplicit(const ASTContext &C, Expr *Base, bool IsArrow, ValueDecl *MemberDecl, QualType T, ExprValueKind VK, ExprObjectKind OK)
Create an implicit MemberExpr, with no location, qualifier, template arguments, and so on.
This represents a decl that may have a name.
IdentifierInfo * getIdentifier() const
Get the identifier that names this declaration, if there is one.
DeclarationName getDeclName() const
Get the actual, stored name of the declaration, which may be a special name.
Represent a C++ namespace.
A C++ nested-name-specifier augmented with source location information.
Represents a parameter to a function.
void setScopeInfo(unsigned scopeDepth, unsigned parameterIndex)
static ParmVarDecl * Create(ASTContext &C, DeclContext *DC, SourceLocation StartLoc, SourceLocation IdLoc, const IdentifierInfo *Id, QualType T, TypeSourceInfo *TInfo, StorageClass S, Expr *DefArg)
A (possibly-)qualified type.
void addConst()
Add the const type qualifier to this QualType.
bool isNull() const
Return true if this QualType doesn't point to a type yet.
QualType getNonReferenceType() const
If Type is a reference type (e.g., const int&), returns the type that the reference refers to ("const...
void setPreviousDecl(decl_type *PrevDecl)
Set the previous declaration.
static ReturnStmt * Create(const ASTContext &Ctx, SourceLocation RL, Expr *E, const VarDecl *NRVOCandidate)
Create a return statement.
unsigned getDepth() const
Returns the depth of this scope. The translation-unit has scope depth 0.
Sema - This implements semantic analysis and AST building for C.
TemplateArgumentLoc getTrivialTemplateArgumentLoc(const TemplateArgument &Arg, QualType NTTPType, SourceLocation Loc, NamedDecl *TemplateParam=nullptr)
Allocate a TemplateArgumentLoc where all locations have been initialized to the given location.
Scope * getCurScope() const
Retrieve the parser's current scope.
@ LookupOrdinaryName
Ordinary name lookup, which finds ordinary names (functions, variables, typedefs, etc....
@ LookupTagName
Tag name lookup, which finds the names of enums, classes, structs, and unions.
ASTContext & getASTContext() const
bool LookupQualifiedName(LookupResult &R, DeclContext *LookupCtx, bool InUnqualifiedLookup=false)
Perform qualified name lookup into a given context.
Encodes a location in the source.
A trivial tuple used to represent a source range.
Stmt - This represents one statement.
bool isCompleteDefinition() const
Return true if this decl has its body fully specified.
A convenient class for passing around template argument information.
void addArgument(const TemplateArgumentLoc &Loc)
Location wrapper for a TemplateArgument.
Represents a template argument.
TemplateParameterList * getTemplateParameters() const
Get the list of template parameters.
NamedDecl * getParam(unsigned Idx)
static TemplateParameterList * Create(const ASTContext &C, SourceLocation TemplateLoc, SourceLocation LAngleLoc, ArrayRef< NamedDecl * > Params, SourceLocation RAngleLoc, Expr *RequiresClause)
Declaration of a template type parameter.
static TemplateTypeParmDecl * Create(const ASTContext &C, DeclContext *DC, SourceLocation KeyLoc, SourceLocation NameLoc, unsigned D, unsigned P, IdentifierInfo *Id, bool Typename, bool ParameterPack, bool HasTypeConstraint=false, UnsignedOrNone NumExpanded=std::nullopt)
SourceLocation getBeginLoc() const LLVM_READONLY
A container of type source information.
The base class of the type hierarchy.
QualType getPointeeType() const
If this is a pointer, ObjC object pointer, or block pointer, this returns the respective pointee.
static UnaryOperator * Create(const ASTContext &C, Expr *input, Opcode opc, QualType type, ExprValueKind VK, ExprObjectKind OK, SourceLocation l, bool CanOverflow, FPOptionsOverride FPFeatures)
friend struct BuiltinTypeMethodBuilder
BuiltinTypeDeclBuilder & addHandleConstructorFromImplicitBinding()
BuiltinTypeDeclBuilder(Sema &SemaRef, CXXRecordDecl *R)
BuiltinTypeDeclBuilder & addSimpleTemplateParams(ArrayRef< StringRef > Names, ConceptDecl *CD)
BuiltinTypeDeclBuilder & addMemberVariable(StringRef Name, QualType Type, llvm::ArrayRef< Attr * > Attrs, AccessSpecifier Access=AccessSpecifier::AS_private)
BuiltinTypeDeclBuilder & addConsumeMethod()
~BuiltinTypeDeclBuilder()
BuiltinTypeDeclBuilder & addHandleConstructorFromBinding()
BuiltinTypeDeclBuilder & addHandleAccessFunction(DeclarationName &Name, bool IsConst, bool IsRef)
friend struct TemplateParameterListBuilder
BuiltinTypeDeclBuilder & addArraySubscriptOperators()
BuiltinTypeDeclBuilder & completeDefinition()
BuiltinTypeDeclBuilder & addAppendMethod()
BuiltinTypeDeclBuilder & addIncrementCounterMethod()
BuiltinTypeDeclBuilder & addHandleMember(ResourceClass RC, bool IsROV, bool RawBuffer, AccessSpecifier Access=AccessSpecifier::AS_private)
BuiltinTypeDeclBuilder & addDefaultHandleConstructor()
BuiltinTypeDeclBuilder & addDecrementCounterMethod()
BuiltinTypeDeclBuilder & addLoadMethods()
__inline void unsigned int _2
The JSON file list parser is used to communicate input to InstallAPI.
@ ICIS_NoInit
No in-class initializer.
@ OK_Ordinary
An ordinary object is located at an address in memory.
AccessSpecifier
A C++ access specifier (public, private, protected), plus the special value "none" which means differ...
@ Result
The result type of a method or function.
bool CreateHLSLAttributedResourceType(Sema &S, QualType Wrapped, ArrayRef< const Attr * > AttrList, QualType &ResType, HLSLAttributedResourceLocInfo *LocInfo=nullptr)
@ VK_PRValue
A pr-value expression (in the C++11 taxonomy) produces a temporary value.
@ VK_LValue
An l-value expression is a reference to an object with independent storage.
const FunctionProtoType * T
@ Other
Other implicit parameter.
Represents an explicit template argument list in C++, e.g., the "<int>" in "sort<int>".
static const ASTTemplateArgumentListInfo * Create(const ASTContext &C, const TemplateArgumentListInfo &List)
DeclarationNameInfo - A collector data type for bundling together a DeclarationName and the correspon...
Extra information about a function prototype.
BuiltinTypeMethodBuilder & addParam(StringRef Name, QualType Ty, HLSLParamModifierAttr::Spelling Modifier=HLSLParamModifierAttr::Keyword_in)
Expr * getResourceHandleExpr()
BuiltinTypeDeclBuilder & finalize()
BuiltinTypeMethodBuilder & operator=(const BuiltinTypeMethodBuilder &Other)=delete
BuiltinTypeMethodBuilder & callBuiltin(StringRef BuiltinName, QualType ReturnType, Ts... ArgSpecs)
BuiltinTypeMethodBuilder & dereference(T Ptr)
~BuiltinTypeMethodBuilder()
BuiltinTypeMethodBuilder & assign(TLHS LHS, TRHS RHS)
BuiltinTypeMethodBuilder(const BuiltinTypeMethodBuilder &Other)=delete
friend BuiltinTypeDeclBuilder
BuiltinTypeMethodBuilder(BuiltinTypeDeclBuilder &DB, DeclarationName &Name, QualType ReturnTy, bool IsConst=false, bool IsCtor=false)
TemplateParameterListBuilder & addTypeParameter(StringRef Name, QualType DefaultValue=QualType())
BuiltinTypeDeclBuilder & finalizeTemplateArgs(ConceptDecl *CD=nullptr)
llvm::SmallVector< NamedDecl * > Params
~TemplateParameterListBuilder()
TemplateParameterListBuilder(BuiltinTypeDeclBuilder &RB)
ConceptSpecializationExpr * constructConceptSpecializationExpr(Sema &S, ConceptDecl *CD)
BuiltinTypeDeclBuilder & Builder