13#ifndef LLVM_CLANG_AST_DECL_H
14#define LLVM_CLANG_AST_DECL_H
38#include "llvm/ADT/APSInt.h"
39#include "llvm/ADT/ArrayRef.h"
40#include "llvm/ADT/PointerIntPair.h"
41#include "llvm/ADT/PointerUnion.h"
42#include "llvm/ADT/StringRef.h"
43#include "llvm/ADT/iterator_range.h"
44#include "llvm/BinaryFormat/DXContainer.h"
45#include "llvm/Frontend/HLSL/HLSLRootSignature.h"
46#include "llvm/Support/Casting.h"
47#include "llvm/Support/Compiler.h"
48#include "llvm/Support/TrailingObjects.h"
59struct ASTTemplateArgumentListInfo;
61class DependentFunctionTemplateSpecializationInfo;
64class FunctionTemplateDecl;
65class FunctionTemplateSpecializationInfo;
68class MemberSpecializationInfo;
76class TemplateArgumentList;
77class TemplateArgumentListInfo;
78class TemplateParameterList;
79class TypeAliasTemplateDecl;
80class UnresolvedSetImpl;
127 virtual void anchor();
166 private llvm::TrailingObjects<PragmaCommentDecl, char> {
169 friend TrailingObjects;
175 :
Decl(PragmaComment, TU, CommentLoc), CommentKind(CommentKind) {}
177 LLVM_DECLARE_VIRTUAL_ANCHOR_FUNCTION();
189 StringRef
getArg()
const {
return getTrailingObjects(); }
200 private llvm::TrailingObjects<PragmaDetectMismatchDecl, char> {
203 friend TrailingObjects;
209 :
Decl(PragmaDetectMismatch, TU,
Loc), ValueStart(ValueStart) {}
211 LLVM_DECLARE_VIRTUAL_ANCHOR_FUNCTION();
221 StringRef
getName()
const {
return getTrailingObjects(); }
222 StringRef
getValue()
const {
return getTrailingObjects() + ValueStart; }
251 virtual void anchor();
279 virtual void anchor();
282 NamedDecl *getUnderlyingDeclImpl() LLVM_READONLY;
286 :
Decl(DK, DC, L), Name(N) {}
301 assert(Name.isIdentifier() &&
"Name is not a simple identifier");
387 bool IsKnownNewer =
true)
const;
402 if (isa<EnumDecl>(DC))
465 std::optional<Visibility>
488 if (this->
getKind() != UsingShadow &&
489 this->
getKind() != ConstructorUsingShadow &&
490 this->
getKind() != ObjCCompatibleAlias &&
491 this->
getKind() != NamespaceAlias)
494 return getUnderlyingDeclImpl();
526 bool MSAsmNameResolved =
false;
535 :
NamedDecl(
Label, DC, IdentL, II), TheStmt(S), LocStart(StartL) {}
537 void anchor()
override;
584 return K >= firstNamespaceBase && K <= lastNamespaceBase;
669 return std::distance(
X.begin(),
X.end()) ==
670 std::distance(Y.begin(), Y.end());
714 void anchor()
override;
788 llvm::PointerUnion<TypeSourceInfo *, ExtInfo *> DeclInfo;
794 bool hasExtInfo()
const {
return isa<ExtInfo *>(DeclInfo); }
795 ExtInfo *getExtInfo() {
return cast<ExtInfo *>(DeclInfo); }
796 const ExtInfo *getExtInfo()
const {
return cast<ExtInfo *>(DeclInfo); }
802 :
ValueDecl(DK, DC, L, N,
T), DeclInfo(TInfo), InnerLocStart(StartL) {}
809 return hasExtInfo() ? getExtInfo()->TInfo
810 : cast<TypeSourceInfo *>(DeclInfo);
815 getExtInfo()->TInfo = TI;
837 return hasExtInfo() ? getExtInfo()->QualifierLoc.getNestedNameSpecifier()
845 return hasExtInfo() ? getExtInfo()->QualifierLoc
856 return hasExtInfo() ? getExtInfo()->TrailingRequiresClause : Null;
862 return hasExtInfo() ? getExtInfo()->NumTemplParamLists : 0;
867 return getExtInfo()->TemplParamLists[index];
879 return K >= firstDeclarator && K <= lastDeclarator;
967 using InitType = llvm::PointerUnion<Stmt *, EvaluatedStmt *>;
978 class VarDeclBitfields {
985 unsigned TSCSpec : 2;
987 unsigned InitStyle : 2;
991 LLVM_PREFERRED_TYPE(
bool)
992 unsigned ARCPseudoStrong : 1;
994 enum { NumVarDeclBits = 8 };
1012 LLVM_PREFERRED_TYPE(VarDeclBitfields)
1017 LLVM_PREFERRED_TYPE(
bool)
1018 unsigned HasInheritedDefaultArg : 1;
1028 LLVM_PREFERRED_TYPE(
bool)
1029 unsigned IsKNRPromoted : 1;
1032 LLVM_PREFERRED_TYPE(
bool)
1033 unsigned IsObjCMethodParam : 1;
1051 LLVM_PREFERRED_TYPE(VarDeclBitfields)
1057 LLVM_PREFERRED_TYPE(
bool)
1058 unsigned IsThisDeclarationADemotedDefinition : 1;
1062 LLVM_PREFERRED_TYPE(
bool)
1063 unsigned ExceptionVar : 1;
1068 LLVM_PREFERRED_TYPE(
bool)
1069 unsigned NRVOVariable : 1;
1073 LLVM_PREFERRED_TYPE(
bool)
1074 unsigned CXXForRangeDecl : 1;
1077 LLVM_PREFERRED_TYPE(
bool)
1078 unsigned ObjCForDecl : 1;
1081 LLVM_PREFERRED_TYPE(
bool)
1082 unsigned IsInline : 1;
1085 LLVM_PREFERRED_TYPE(
bool)
1086 unsigned IsInlineSpecified : 1;
1089 LLVM_PREFERRED_TYPE(
bool)
1090 unsigned IsConstexpr : 1;
1094 LLVM_PREFERRED_TYPE(
bool)
1095 unsigned IsInitCapture : 1;
1100 LLVM_PREFERRED_TYPE(
bool)
1101 unsigned PreviousDeclInSameBlockScope : 1;
1108 LLVM_PREFERRED_TYPE(
bool)
1109 unsigned EscapingByref : 1;
1111 LLVM_PREFERRED_TYPE(
bool)
1112 unsigned IsCXXCondDecl : 1;
1116 LLVM_PREFERRED_TYPE(
bool)
1117 unsigned IsCXXForRangeImplicitVar : 1;
1174 assert(
VarDeclBits.TSCSpec == TSC &&
"truncation");
1256 return DC->getRedeclContext()->isFunctionOrMethod();
1343 if (K == ParmVar || K == ImplicitParam)
1416 bool IsConstantInitialization)
const;
1476 return isa<ParmVarDecl>(
this) ?
false :
1487 assert(!isa<ParmVarDecl>(
this) &&
"Cannot demote ParmVarDecls!");
1497 assert(!isa<ParmVarDecl>(
this));
1515 assert(!isa<ParmVarDecl>(
this));
1525 assert(!isa<ParmVarDecl>(
this));
1554 return isa<ParmVarDecl>(
this) ?
false
1558 assert(!isa<ParmVarDecl>(
this));
1563 assert(!isa<ParmVarDecl>(
this));
1572 assert(!isa<ParmVarDecl>(
this));
1581 assert(!isa<ParmVarDecl>(
this));
1588 return isa<ParmVarDecl>(
this)
1593 assert(!isa<ParmVarDecl>(
this));
1615 assert(!isa<ParmVarDecl>(
this));
1622 return isa<ParmVarDecl>(
this) ?
false
1627 assert(!isa<ParmVarDecl>(
this) &&
1628 "Cannot set IsCXXForRangeImplicitVar on ParmVarDecl");
1749 void anchor()
override;
1798 :
VarDecl(DK,
C, DC, StartLoc, IdLoc,
Id,
T, TInfo, S) {
1819 setParameterIndex(parameterIndex);
1829 setParameterIndex(parameterIndex);
1850 return getParameterIndex();
1878 return ExplicitObjectParameterIntroducerLoc.
isValid();
1882 ExplicitObjectParameterIntroducerLoc =
Loc;
1886 return ExplicitObjectParameterIntroducerLoc;
1960 void setParameterIndex(
unsigned parameterIndex) {
1961 if (parameterIndex >= ParameterIndexSentinel) {
1962 setParameterIndexLarge(parameterIndex);
1967 assert(
ParmVarDeclBits.ParameterIndex == parameterIndex &&
"truncation!");
1969 unsigned getParameterIndex()
const {
1971 return d == ParameterIndexSentinel ? getParameterIndexLarge() : d;
1974 void setParameterIndexLarge(
unsigned parameterIndex);
1975 unsigned getParameterIndexLarge()
const;
2026 : llvm::TrailingObjects<DefaultedOrDeletedFunctionInfo, DeclAccessPair,
2028 friend TrailingObjects;
2029 unsigned NumLookups;
2030 bool HasDeletedMessage;
2032 size_t numTrailingObjects(OverloadToken<DeclAccessPair>)
const {
2044 return getTrailingObjects<DeclAccessPair>(NumLookups);
2048 return HasDeletedMessage ? *getTrailingObjects<StringLiteral *>()
2100 TemplateOrSpecialization;
2127 void setFunctionTemplateSpecialization(
2154 const DeclarationNameInfo &NameInfo, QualType
T,
2157 const AssociatedConstraint &TrailingRequiresClause);
2198 TrailingRequiresClause);
2201 static FunctionDecl *
2202 Create(ASTContext &
C, DeclContext *DC, SourceLocation StartLoc,
2203 const DeclarationNameInfo &NameInfo, QualType
T, TypeSourceInfo *TInfo,
2206 const AssociatedConstraint &TrailingRequiresClause);
2224 if (FPT && FPT->isVariadic())
2273 bool CheckForPendingFriendDefinition =
false)
const;
2403 "Can't set default loc is function isn't explicitly defaulted");
2404 DefaultKWLoc = NewLoc;
2410 auto *DeclAsWritten =
this;
2412 DeclAsWritten = Pattern;
2413 return !(DeclAsWritten->isDeleted() ||
2414 DeclAsWritten->getCanonicalDecl()->isDefaulted());
2595 bool *IsNothrow =
nullptr)
const {
2599 AlignmentParam, IsNothrow);
2627 bool *IsNothrow =
nullptr)
const;
2747 ACs.emplace_back(AC);
2764 unsigned getBuiltinID(
bool ConsiderWrapperFunctions =
false)
const;
2792 return ParamInfo[i];
2796 return ParamInfo[i];
3074 InsertPos, TSK, TemplateArgsAsWritten,
3075 PointOfInstantiation);
3131 if (
const auto *FPT =
3133 return FPT->getFunctionEffects();
3140 return K >= firstFunction && K <= lastFunction;
3158 enum InitStorageKind {
3174 ISK_CapturedVLAType,
3177 LLVM_PREFERRED_TYPE(
bool)
3178 unsigned BitField : 1;
3179 LLVM_PREFERRED_TYPE(
bool)
3180 unsigned Mutable : 1;
3181 LLVM_PREFERRED_TYPE(InitStorageKind)
3182 unsigned StorageKind : 2;
3183 mutable unsigned CachedFieldIndex : 28;
3187 struct InitAndBitWidthStorage {
3218 Mutable(Mutable), StorageKind((InitStorageKind)InitStyle),
3219 CachedFieldIndex(0),
Init() {
3240 if (Canonical->CachedFieldIndex == 0) {
3241 Canonical->setCachedFieldIndex();
3242 assert(Canonical->CachedFieldIndex != 0);
3244 return Canonical->CachedFieldIndex - 1;
3249 void setCachedFieldIndex()
const;
3290 "bit width or captured type already set");
3291 assert(Width &&
"no bit width specified");
3303 assert(
isBitField() &&
"no bitfield width to remove");
3307 Init = ExistingInit;
3328 return (StorageKind == ISK_CapturedVLAType ?
ICIS_NoInit
3362 StorageKind = ISK_NoInit;
3373 return StorageKind == ISK_CapturedVLAType;
3423 const llvm::APSInt &
V);
3431 const llvm::APSInt &
V);
3437 return llvm::APSInt(
getValue(), IsUnsigned);
3443 IsUnsigned =
V.isUnsigned();
3462 unsigned ChainingSize;
3468 void anchor()
override;
3488 assert(
chain().size() >= 2);
3489 return cast<FieldDecl>(
chain().back());
3493 assert(
chain().size() >= 2);
3494 return dyn_cast<VarDecl>(
chain().front());
3514 mutable const Type *TypeForDecl =
nullptr;
3519 void anchor()
override;
3532 assert(!isa<TagDecl>(
this));
3536 assert(!isa<TagDecl>(
this));
3556 struct alignas(8) ModedTInfo {
3563 mutable llvm::PointerIntPair<
3564 llvm::PointerUnion<TypeSourceInfo *, ModedTInfo *>, 2>
3567 void anchor()
override;
3574 MaybeModedTInfo(TInfo, 0) {}
3602 return isa<ModedTInfo *>(MaybeModedTInfo.getPointer());
3606 return isModed() ? cast<ModedTInfo *>(MaybeModedTInfo.getPointer())->first
3607 : cast<TypeSourceInfo *>(MaybeModedTInfo.getPointer());
3611 return isModed() ? cast<ModedTInfo *>(MaybeModedTInfo.getPointer())->second
3612 : cast<TypeSourceInfo *>(MaybeModedTInfo.getPointer())
3617 MaybeModedTInfo.setPointer(newType);
3622 ModedTInfo({unmodedTSI, modedTy}));
3639 if (MaybeModedTInfo.getInt())
3640 return MaybeModedTInfo.getInt() & 0x2;
3641 return isTransparentTagSlow();
3651 return K >= firstTypedefName && K <= lastTypedefName;
3655 bool isTransparentTagSlow()
const;
3732 llvm::PointerUnion<TypedefNameDecl *, ExtInfo *> TypedefNameDeclOrQualifier;
3734 bool hasExtInfo()
const {
return isa<ExtInfo *>(TypedefNameDeclOrQualifier); }
3735 ExtInfo *getExtInfo() {
return cast<ExtInfo *>(TypedefNameDeclOrQualifier); }
3736 const ExtInfo *getExtInfo()
const {
3737 return cast<ExtInfo *>(TypedefNameDeclOrQualifier);
3742 SourceLocation L, IdentifierInfo *
Id, TagDecl *PrevDecl,
3743 SourceLocation StartL);
3836 TagDeclBits.IsEmbeddedInDeclarator = isInDeclarator;
3858 return TagDeclBits.IsThisDeclarationADemotedDefinition;
3865 "Should demote definitions only, not forward declarations");
3867 TagDeclBits.IsThisDeclarationADemotedDefinition =
true;
3890 return const_cast<TagDecl *
>(
this);
3896 return Def->isBeingDefined();
3909 TagDeclBits.TagDeclKind = llvm::to_underlying(TK);
3942 return hasExtInfo() ? nullptr
3943 : cast<TypedefNameDecl *>(TypedefNameDeclOrQualifier);
4018 llvm::PointerUnion<const Type *, TypeSourceInfo *> IntegerType;
4038 bool Scoped,
bool ScopedUsingClassTag,
bool Fixed);
4040 void anchor()
override;
4047 void setNumPositiveBits(
unsigned Num) {
4049 assert(
EnumDeclBits.NumPositiveBits ==
Num &&
"can't store this bitcount");
4075 bool hasODRHash()
const {
return EnumDeclBits.HasODRHash; }
4076 void setHasODRHash(
bool Hash =
true) {
EnumDeclBits.HasODRHash = Hash; }
4089 return cast_or_null<EnumDecl>(
4114 bool IsScoped,
bool IsScopedUsingClassTag,
4129 unsigned NumPositiveBits,
4130 unsigned NumNegativeBits);
4167 if (
const Type *
T = dyn_cast<const Type *>(IntegerType))
4169 return cast<TypeSourceInfo *>(IntegerType)->getType().getUnqualifiedType();
4181 return dyn_cast_if_present<TypeSourceInfo *>(IntegerType);
4264 return SpecializationInfo;
4324 return cast_or_null<RecordDecl>(
4408 return RecordDeclBits.HasNonTrivialToPrimitiveDefaultInitializeCUnion;
4506 using field_range = llvm::iterator_range<specific_decl_iterator<FieldDecl>>;
4525 return K >= firstRecord && K <= lastRecord;
4547 void LoadFieldsFromExternalStorage()
const;
4551 void setODRHash(
unsigned Hash) {
RecordDeclBits.ODRHash = Hash; }
4560 :
Decl(FileScopeAsm, DC, StartL), AsmString(asmstring), RParenLoc(EndL) {}
4562 virtual void anchor();
4597 Stmt *Statement =
nullptr;
4598 bool IsSemiMissing =
false;
4601 :
Decl(TopLevelStmt, DC, L),
DeclContext(TopLevelStmt), Statement(S) {}
4603 virtual void anchor();
4643 llvm::PointerIntPair<VarDecl*, 2> VariableAndFlags;
4652 : VariableAndFlags(variable,
4653 (byRef ? flag_isByRef : 0) | (nested ? flag_isNested : 0)),
4661 bool isByRef()
const {
return VariableAndFlags.getInt() & flag_isByRef; }
4673 bool isNested()
const {
return VariableAndFlags.getInt() & flag_isNested; }
4685 unsigned NumParams = 0;
4687 Stmt *Body =
nullptr;
4690 const Capture *Captures =
nullptr;
4691 unsigned NumCaptures = 0;
4693 unsigned ManglingNumber = 0;
4694 Decl *ManglingContextDecl =
nullptr;
4738 return ParamInfo[i];
4742 return ParamInfo[i];
4794 bool CapturesCXXThis);
4801 ManglingNumber = Number;
4802 ManglingContextDecl = Ctx;
4810 return FPT->getFunctionEffects();
4837 private llvm::TrailingObjects<OutlinedFunctionDecl, ImplicitParamDecl *> {
4843 llvm::PointerIntPair<Stmt *, 1, bool> BodyAndNothrow;
4857 unsigned NumParams);
4870 assert(i < NumParams);
4871 return getParams()[i];
4874 assert(i < NumParams);
4902 private llvm::TrailingObjects<CapturedDecl, ImplicitParamDecl *> {
4913 unsigned ContextParam;
4916 llvm::PointerIntPair<Stmt *, 1, bool> BodyAndNothrow;
4922 ImplicitParamDecl **getParams() {
return getTrailingObjects(); }
4930 unsigned NumParams);
4932 unsigned NumParams);
4943 assert(i < NumParams);
4944 return getParams()[i];
4947 assert(i < NumParams);
4961 assert(ContextParam < NumParams);
4965 assert(i < NumParams);
5011 llvm::TrailingObjects<ImportDecl, SourceLocation> {
5015 friend TrailingObjects;
5018 Module *ImportedModule =
nullptr;
5028 llvm::PointerIntPair<ImportDecl *, 1, bool> NextLocalImportAndComplete;
5038 bool isImportComplete()
const {
return NextLocalImportAndComplete.getInt(); }
5040 void setImportComplete(
bool C) { NextLocalImportAndComplete.setInt(
C); }
5044 ImportDecl *getNextLocalImport()
const {
5045 return NextLocalImportAndComplete.getPointer();
5048 void setNextLocalImport(ImportDecl *Import) {
5049 NextLocalImportAndComplete.setPointer(Import);
5055 SourceLocation StartLoc, Module *Imported,
5056 ArrayRef<SourceLocation> IdentifierLocs);
5061 SourceLocation StartLoc, Module *Imported,
5062 SourceLocation EndLoc);
5066 unsigned NumLocations);
5091 LLVM_DECLARE_VIRTUAL_ANCHOR_FUNCTION();
5140 virtual void anchor();
5163 bool HasValidPackoffset;
5223 llvm::concat_iterator<Decl *const, SmallVector<Decl *>::const_iterator,
5240 private llvm::TrailingObjects<HLSLRootSignatureDecl,
5241 llvm::hlsl::rootsig::RootElement> {
5242 friend TrailingObjects;
5244 llvm::dxbc::RootSignatureVersion Version;
5248 llvm::hlsl::rootsig::RootElement *getElems() {
return getTrailingObjects(); }
5250 const llvm::hlsl::rootsig::RootElement *getElems()
const {
5251 return getTrailingObjects();
5255 llvm::dxbc::RootSignatureVersion Version,
5261 llvm::dxbc::RootSignatureVersion Version,
5267 llvm::dxbc::RootSignatureVersion
getVersion()
const {
return Version; }
5270 return {getElems(), NumElems};
5287template<
typename decl_type>
5291 assert(RedeclLink.isFirst() &&
5292 "setPreviousDecl on a decl already in a redeclaration chain");
5298 First = PrevDecl->getFirstDecl();
5299 assert(
First->RedeclLink.isFirst() &&
"Expected first");
5300 decl_type *MostRecent =
First->getNextRedeclaration();
5301 RedeclLink = PreviousDeclLink(cast<decl_type>(MostRecent));
5305 static_cast<decl_type*
>(
this)->IdentifierNamespace |=
5306 MostRecent->getIdentifierNamespace() &
5310 First =
static_cast<decl_type*
>(
this);
5314 First->RedeclLink.setLatest(
static_cast<decl_type*
>(
this));
5316 assert(!isa<NamedDecl>(
static_cast<decl_type*
>(
this)) ||
5317 cast<NamedDecl>(
static_cast<decl_type*
>(
this))->isLinkageValid());
5328 return Def->isComplete();
5344 return "$ompvariant";
5350 bool IncludeLocallyStreaming);
Provides definitions for the various language-specific address spaces.
Defines the Diagnostic-related interfaces.
enum clang::sema::@1840::IndirectLocalPathEntry::EntryKind Kind
Defines the clang::IdentifierInfo, clang::IdentifierTable, and clang::Selector interfaces.
Forward-declares and imports various common LLVM datatypes that clang wants to use unqualified.
Defines an enumeration for C++ overloaded operators.
Implements a partial diagnostic that can be emitted anwyhere in a DiagnosticBuilder stream.
Defines the clang::SourceLocation class and associated facilities.
Defines various enumerations that describe declaration and type specifiers.
C Language Family Type Representation.
Defines clang::UnsignedOrNone.
Defines the clang::Visibility enumeration and various utility functions.
void setValue(const ASTContext &C, const llvm::APInt &Val)
llvm::APInt getValue() const
APValue - This class implements a discriminated union of [uninitialized] [APSInt] [APFloat],...
Holds long-lived AST nodes (such as types and decls) that can be referred to throughout the semantic ...
Reads an AST files chain containing the contents of a translation unit.
A class which contains all the information about a particular captured value.
bool isNested() const
Whether this is a nested capture, i.e.
void setCopyExpr(Expr *e)
Expr * getCopyExpr() const
bool isByRef() const
Whether this is a "by ref" capture, i.e.
Capture(VarDecl *variable, bool byRef, bool nested, Expr *copy)
bool isNonEscapingByref() const
VarDecl * getVariable() const
The variable being captured.
bool isEscapingByref() const
Represents a block literal declaration, which is like an unnamed FunctionDecl.
ParmVarDecl * getParamDecl(unsigned i)
static bool classofKind(Kind K)
CompoundStmt * getCompoundBody() const
static bool classof(const Decl *D)
unsigned getNumParams() const
unsigned getNumCaptures() const
Returns the number of captured variables.
void setParams(ArrayRef< ParmVarDecl * > NewParamInfo)
capture_const_iterator capture_begin() const
bool canAvoidCopyToHeap() const
void setDoesNotEscape(bool B=true)
param_iterator param_end()
capture_const_iterator capture_end() const
ArrayRef< Capture >::const_iterator capture_const_iterator
unsigned getBlockManglingNumber() const
param_const_iterator param_end() const
MutableArrayRef< ParmVarDecl * >::iterator param_iterator
size_t param_size() const
void setCapturesCXXThis(bool B=true)
void setSignatureAsWritten(TypeSourceInfo *Sig)
void setBlockMangling(unsigned Number, Decl *Ctx)
MutableArrayRef< ParmVarDecl * > parameters()
void setCanAvoidCopyToHeap(bool B=true)
param_iterator param_begin()
void setIsConversionFromLambda(bool val=true)
Stmt * getBody() const override
getBody - If this Decl represents a declaration for a body of code, such as a function or method defi...
static DeclContext * castToDeclContext(const BlockDecl *D)
void setBlockMissingReturnType(bool val=true)
FunctionEffectsRef getFunctionEffects() const
ArrayRef< Capture > captures() const
SourceRange getSourceRange() const override LLVM_READONLY
Source range that this declaration covers.
static BlockDecl * CreateDeserialized(ASTContext &C, GlobalDeclID ID)
void setIsVariadic(bool value)
bool blockMissingReturnType() const
SourceLocation getCaretLocation() const
bool capturesCXXThis() const
bool capturesVariable(const VarDecl *var) const
bool doesNotEscape() const
bool hasCaptures() const
True if this block (or its nested blocks) captures anything of local storage from its enclosing scope...
Decl * getBlockManglingContextDecl() const
ArrayRef< ParmVarDecl * >::const_iterator param_const_iterator
static BlockDecl * castFromDeclContext(const DeclContext *DC)
const ParmVarDecl * getParamDecl(unsigned i) const
void setBody(CompoundStmt *B)
param_const_iterator param_begin() const
bool isConversionFromLambda() const
ArrayRef< ParmVarDecl * > parameters() const
void setCaptures(ASTContext &Context, ArrayRef< Capture > Captures, bool CapturesCXXThis)
TypeSourceInfo * getSignatureAsWritten() const
Represents a C++ struct/union/class.
Represents the body of a CapturedStmt, and serves as its DeclContext.
unsigned getNumParams() const
static bool classof(const Decl *D)
ImplicitParamDecl *const * param_iterator
ImplicitParamDecl * getContextParam() const
Retrieve the parameter containing captured variables.
ArrayRef< ImplicitParamDecl * > parameters() const
static DeclContext * castToDeclContext(const CapturedDecl *D)
size_t numTrailingObjects(OverloadToken< ImplicitParamDecl >)
static CapturedDecl * CreateDeserialized(ASTContext &C, GlobalDeclID ID, unsigned NumParams)
unsigned getContextParamPosition() const
static CapturedDecl * castFromDeclContext(const DeclContext *DC)
static bool classofKind(Kind K)
void setContextParam(unsigned i, ImplicitParamDecl *P)
void setNothrow(bool Nothrow=true)
void setParam(unsigned i, ImplicitParamDecl *P)
param_iterator param_end() const
Retrieve an iterator one past the last parameter decl.
MutableArrayRef< ImplicitParamDecl * > parameters()
param_iterator param_begin() const
Retrieve an iterator pointing to the first parameter decl.
llvm::iterator_range< param_iterator > param_range
Stmt * getBody() const override
getBody - If this Decl represents a declaration for a body of code, such as a function or method defi...
ImplicitParamDecl * getParam(unsigned i) const
CharUnits - This is an opaque type for sizes expressed in character units.
CompoundStmt - This represents a group of statements like { stmt stmt }.
decl_iterator - Iterates through the declarations stored within this context.
specific_decl_iterator - Iterates over a subrange of declarations stored in a DeclContext,...
DeclContext - This is used only as base class of specific decl types that can act as declaration cont...
DeclContext * getParent()
getParent - Returns the containing DeclContext.
FunctionDeclBitfields FunctionDeclBits
TagDeclBitfields TagDeclBits
bool isDependentContext() const
Determines whether this context is dependent on a template parameter.
EnumDeclBitfields EnumDeclBits
lookup_result lookup(DeclarationName Name) const
lookup - Find the declarations (if any) with the given Name in this context.
BlockDeclBitfields BlockDeclBits
DeclContext * getRedeclContext()
getRedeclContext - Retrieve the context in which an entity conflicts with other entities of the same ...
RecordDeclBitfields RecordDeclBits
NamespaceDeclBitfields NamespaceDeclBits
bool isFunctionOrMethod() const
Decl::Kind getDeclKind() const
DeclContext * getNonTransparentContext()
decl_iterator decls_begin() const
Decl - This represents one declaration (or definition), e.g.
Decl * getPreviousDecl()
Retrieve the previous declaration that declares the same entity as this declaration,...
Decl * getMostRecentDecl()
Retrieve the most recent declaration that declares the same entity as this declaration (which may be ...
SourceLocation getEndLoc() const LLVM_READONLY
bool isModulePrivate() const
Whether this declaration was marked as being private to the module in which it was defined.
ASTContext & getASTContext() const LLVM_READONLY
bool hasCachedLinkage() const
Kind
Lists the kind of concrete classes of Decl.
ObjCDeclQualifier
ObjCDeclQualifier - 'Qualifiers' written next to the return and parameter types in method declaration...
bool hasDefiningAttr() const
Return true if this declaration has an attribute which acts as definition of the entity,...
SourceLocation getLocation() const
@ IDNS_Ordinary
Ordinary names.
@ IDNS_Type
Types, declared with 'struct foo', typedefs, etc.
@ IDNS_Tag
Tags, declared with 'struct foo;' and referenced with 'struct foo'.
void setImplicit(bool I=true)
DeclContext * getDeclContext()
void setModulePrivate()
Specify that this declaration was marked as being private to the module in which it was defined.
void setDeclContext(DeclContext *DC)
setDeclContext - Set both the semantic and lexical DeclContext to DC.
Module * getOwningModuleForLinkage() const
Get the module that owns this declaration for linkage purposes.
DeclContext * getLexicalDeclContext()
getLexicalDeclContext - The declaration context where this Decl was lexically declared (LexicalDC).
DeclarationNameLoc - Additional source/type location info for a declaration name.
The name of a declaration.
Represents a ValueDecl that came out of a declarator.
SourceLocation getTypeSpecEndLoc() const
SourceLocation getInnerLocStart() const
Return start of source range ignoring outer template declarations.
TemplateParameterList * getTemplateParameterList(unsigned index) const
static bool classofKind(Kind K)
void setInnerLocStart(SourceLocation L)
SourceLocation getOuterLocStart() const
Return start of source range taking into account any outer template declarations.
SourceRange getSourceRange() const override LLVM_READONLY
Source range that this declaration covers.
SourceLocation getTypeSpecStartLoc() const
SourceLocation getBeginLoc() const LLVM_READONLY
const AssociatedConstraint & getTrailingRequiresClause() const
Get the constraint-expression introduced by the trailing requires-clause in the function/member decla...
unsigned getNumTemplateParameterLists() const
void setTypeSourceInfo(TypeSourceInfo *TI)
DeclaratorDecl(Kind DK, DeclContext *DC, SourceLocation L, DeclarationName N, QualType T, TypeSourceInfo *TInfo, SourceLocation StartL)
void setQualifierInfo(NestedNameSpecifierLoc QualifierLoc)
void setTrailingRequiresClause(const AssociatedConstraint &AC)
NestedNameSpecifierLoc getQualifierLoc() const
Retrieve the nested-name-specifier (with source-location information) that qualifies the name of this...
static bool classof(const Decl *D)
NestedNameSpecifier getQualifier() const
Retrieve the nested-name-specifier that qualifies the name of this declaration, if it was present in ...
TypeSourceInfo * getTypeSourceInfo() const
void setTemplateParameterListsInfo(ASTContext &Context, ArrayRef< TemplateParameterList * > TPLists)
Provides information about a dependent function-template specialization declaration.
@ ak_nameddecl
NamedDecl *.
Represents an empty-declaration.
static EmptyDecl * CreateDeserialized(ASTContext &C, GlobalDeclID ID)
static bool classof(const Decl *D)
static bool classofKind(Kind K)
An instance of this object exists for each enum constant that is defined.
static EnumConstantDecl * CreateDeserialized(ASTContext &C, GlobalDeclID ID)
static bool classofKind(Kind K)
const EnumConstantDecl * getCanonicalDecl() const
void setInitExpr(Expr *E)
void setInitVal(const ASTContext &C, const llvm::APSInt &V)
llvm::APSInt getInitVal() const
EnumConstantDecl * getCanonicalDecl() override
Retrieves the canonical declaration of this enumerator.
static bool classof(const Decl *D)
const Expr * getInitExpr() const
SourceRange getSourceRange() const override LLVM_READONLY
Source range that this declaration covers.
const EnumDecl * getMostRecentDecl() const
MemberSpecializationInfo * getMemberSpecializationInfo() const
If this enumeration is an instantiation of a member enumeration of a class template specialization,...
enumerator_range enumerators() const
void setFixed(bool Fixed=true)
True if this is an Objective-C, C++11, or Microsoft-style enumeration with a fixed underlying type.
bool isScoped() const
Returns true if this is a C++11 scoped enumeration.
unsigned getNumNegativeBits() const
Returns the width in bits required to store all the negative enumerators of this enum.
bool isScopedUsingClassTag() const
Returns true if this is a C++11 scoped enumeration.
void setIntegerType(QualType T)
Set the underlying integer type.
void setIntegerTypeSourceInfo(TypeSourceInfo *TInfo)
Set the underlying integer type source info.
enumerator_iterator enumerator_begin() const
bool isComplete() const
Returns true if this can be considered a complete type.
void setInstantiationOfMemberEnum(EnumDecl *ED, TemplateSpecializationKind TSK)
Specify that this enumeration is an instantiation of the member enumeration ED.
const EnumDecl * getCanonicalDecl() const
void setTemplateSpecializationKind(TemplateSpecializationKind TSK, SourceLocation PointOfInstantiation=SourceLocation())
For an enumeration member that was instantiated from a member enumeration of a templated class,...
TypeSourceInfo * getIntegerTypeSourceInfo() const
Return the type source info for the underlying integer type, if no type source info exists,...
static EnumDecl * CreateDeserialized(ASTContext &C, GlobalDeclID ID)
bool isClosedFlag() const
Returns true if this enum is annotated with flag_enum and isn't annotated with enum_extensibility(ope...
EnumDecl * getMostRecentDecl()
EnumDecl * getDefinitionOrSelf() const
void setScoped(bool Scoped=true)
True if this tag declaration is a scoped enumeration.
bool isFixed() const
Returns true if this is an Objective-C, C++11, or Microsoft-style enumeration with a fixed underlying...
SourceRange getIntegerTypeRange() const LLVM_READONLY
Retrieve the source range that covers the underlying type if specified.
void setPromotionType(QualType T)
Set the promotion type.
EnumDecl * getPreviousDecl()
SourceRange getSourceRange() const override LLVM_READONLY
Overrides to provide correct range when there's an enum-base specifier with forward declarations.
static bool classofKind(Kind K)
llvm::iterator_range< specific_decl_iterator< EnumConstantDecl > > enumerator_range
static bool classof(const Decl *D)
EnumDecl * getCanonicalDecl() override
Retrieves the "canonical" declaration of the given declaration.
QualType getIntegerType() const
Return the integer type this enum decl corresponds to.
EnumDecl * getInstantiatedFromMemberEnum() const
Returns the enumeration (declared within the template) from which this enumeration type was instantia...
EnumDecl * getDefinition() const
unsigned getNumPositiveBits() const
Returns the width in bits required to store all the non-negative enumerators of this enum.
const EnumDecl * getPreviousDecl() const
specific_decl_iterator< EnumConstantDecl > enumerator_iterator
TemplateSpecializationKind getTemplateSpecializationKind() const
If this enumeration is a member of a specialization of a templated class, determine what kind of temp...
void setScopedUsingClassTag(bool ScopedUCT=true)
If this tag declaration is a scoped enum, then this is true if the scoped enum was declared using the...
bool isClosed() const
Returns true if this enum is either annotated with enum_extensibility(closed) or isn't annotated with...
QualType getPromotionType() const
Return the integer type that enumerators should promote to.
EnumDecl * getTemplateInstantiationPattern() const
Retrieve the enum definition from which this enumeration could be instantiated, if it is an instantia...
bool isClosedNonFlag() const
Returns true if this enum is annotated with neither flag_enum nor enum_extensibility(open).
enumerator_iterator enumerator_end() const
void getValueRange(llvm::APInt &Max, llvm::APInt &Min) const
Calculates the [Min,Max) values the enum can store based on the NumPositiveBits and NumNegativeBits.
Represents a standard C++ module export declaration.
static bool classof(const Decl *D)
SourceLocation getRBraceLoc() const
SourceLocation getEndLoc() const LLVM_READONLY
SourceLocation getExportLoc() const
static bool classofKind(Kind K)
SourceRange getSourceRange() const override LLVM_READONLY
Source range that this declaration covers.
void setRBraceLoc(SourceLocation L)
static DeclContext * castToDeclContext(const ExportDecl *D)
static ExportDecl * castFromDeclContext(const DeclContext *DC)
static ExportDecl * CreateDeserialized(ASTContext &C, GlobalDeclID ID)
This represents one expression.
Declaration context for names declared as extern "C" in C++.
static DeclContext * castToDeclContext(const ExternCContextDecl *D)
static bool classof(const Decl *D)
static bool classofKind(Kind K)
static ExternCContextDecl * castFromDeclContext(const DeclContext *DC)
Represents a member of a struct/union/class.
bool isMutable() const
Determines whether this field is mutable (C++ only).
Expr * getInClassInitializer() const
Get the C++11 default member initializer for this member, or null if one has not been set.
bool isBitField() const
Determines whether this field is a bitfield.
bool hasInClassInitializer() const
Determine whether this member has a C++11 default member initializer.
FieldDecl(Kind DK, DeclContext *DC, SourceLocation StartLoc, SourceLocation IdLoc, const IdentifierInfo *Id, QualType T, TypeSourceInfo *TInfo, Expr *BW, bool Mutable, InClassInitStyle InitStyle)
unsigned getBitWidthValue() const
Computes the bit width of this field, if this is a bit field.
bool isAnonymousStructOrUnion() const
Determines whether this field is a representative for an anonymous struct or union.
SourceRange getSourceRange() const override LLVM_READONLY
Source range that this declaration covers.
void setBitWidth(Expr *Width)
Set the bit-field width for this member.
void removeBitWidth()
Remove the bit-field width from this member.
InClassInitStyle getInClassInitStyle() const
Get the kind of (C++11) default member initializer that this field has.
bool hasConstantIntegerBitWidth() const
Determines whether the bit width of this field is a constant integer.
static FieldDecl * CreateDeserialized(ASTContext &C, GlobalDeclID ID)
void removeInClassInitializer()
Remove the C++11 in-class initializer from this member.
void setInClassInitializer(Expr *NewInit)
Set the C++11 in-class initializer for this member.
unsigned getFieldIndex() const
Returns the index of this field within its record, as appropriate for passing to ASTRecordLayout::get...
const RecordDecl * getParent() const
Returns the parent of this field declaration, which is the struct in which this field is defined.
bool isZeroSize(const ASTContext &Ctx) const
Determine if this field is a subobject of zero size, that is, either a zero-length bit-field or a fie...
InitAndBitWidthStorage * InitAndBitWidth
FieldDecl * getCanonicalDecl() override
Retrieves the canonical declaration of this field.
static bool classofKind(Kind K)
bool hasCapturedVLAType() const
Determine whether this member captures the variable length array type.
bool isUnnamedBitField() const
Determines whether this is an unnamed bitfield.
bool isZeroLengthBitField() const
Is this a zero-length bit-field? Such bit-fields aren't really bit-fields at all and instead act as a...
Expr * getBitWidth() const
Returns the expression that represents the bit width, if this field is a bit field.
void printName(raw_ostream &OS, const PrintingPolicy &Policy) const override
Pretty-print the unqualified name of this declaration.
const FieldDecl * getCanonicalDecl() const
const FieldDecl * findCountedByField() const
Find the FieldDecl specified in a FAM's "counted_by" attribute.
const VariableArrayType * getCapturedVLAType() const
Get the captured variable length array type.
bool isPotentiallyOverlapping() const
Determine if this field is of potentially-overlapping class type, that is, subobject with the [[no_un...
void setCapturedVLAType(const VariableArrayType *VLAType)
Set the captured variable length array type for this field.
bool hasNonNullInClassInitializer() const
Determine whether getInClassInitializer() would return a non-null pointer without deserializing the i...
const VariableArrayType * CapturedVLAType
static bool classof(const Decl *D)
void setRParenLoc(SourceLocation L)
SourceLocation getAsmLoc() const
std::string getAsmString() const
Expr * getAsmStringExpr()
static bool classofKind(Kind K)
const Expr * getAsmStringExpr() const
SourceLocation getRParenLoc() const
static bool classof(const Decl *D)
SourceRange getSourceRange() const override LLVM_READONLY
Source range that this declaration covers.
void setAsmString(Expr *Asm)
static FileScopeAsmDecl * CreateDeserialized(ASTContext &C, GlobalDeclID ID)
Stashed information about a defaulted/deleted function body.
StringLiteral * getDeletedMessage() const
void setDeletedMessage(StringLiteral *Message)
ArrayRef< DeclAccessPair > getUnqualifiedLookups() const
Get the unqualified lookup results that should be used in this defaulted function definition.
Represents a function declaration or definition.
unsigned getMemoryFunctionKind() const
Identify a memory copying or setting function.
static constexpr unsigned RequiredTypeAwareDeleteParameterCount
Count of mandatory parameters for type aware operator delete.
void setInstantiationIsPending(bool IC)
State that the instantiation of this function is pending.
bool isTargetClonesMultiVersion() const
True if this function is a multiversioned dispatch function as a part of the target-clones functional...
bool isMultiVersion() const
True if this function is considered a multiversioned function.
static FunctionDecl * Create(ASTContext &C, DeclContext *DC, SourceLocation StartLoc, SourceLocation NLoc, DeclarationName N, QualType T, TypeSourceInfo *TInfo, StorageClass SC, bool UsesFPIntrin=false, bool isInlineSpecified=false, bool hasWrittenPrototype=true, ConstexprSpecKind ConstexprKind=ConstexprSpecKind::Unspecified, const AssociatedConstraint &TrailingRequiresClause={})
const ParmVarDecl * getParamDecl(unsigned i) const
ExceptionSpecificationType getExceptionSpecType() const
Gets the ExceptionSpecificationType as declared.
bool isTrivialForCall() const
bool hasTrivialBody() const
Returns whether the function has a trivial body that does not require any specific codegen.
ConstexprSpecKind getConstexprKind() const
unsigned getMinRequiredArguments() const
Returns the minimum number of arguments needed to call this function.
bool isFunctionTemplateSpecialization() const
Determine whether this function is a function template specialization.
void setPreviousDeclaration(FunctionDecl *PrevDecl)
void setDescribedFunctionTemplate(FunctionTemplateDecl *Template)
FunctionTemplateDecl * getDescribedFunctionTemplate() const
Retrieves the function template that is described by this function declaration.
void setIsPureVirtual(bool P=true)
const FunctionDecl * getDefinition() const
bool isThisDeclarationADefinition() const
Returns whether this specific declaration of the function is also a definition that does not contain ...
bool isImmediateFunction() const
void setDefaultedOrDeletedInfo(DefaultedOrDeletedFunctionInfo *Info)
void setFriendConstraintRefersToEnclosingTemplate(bool V=true)
SourceLocation getEllipsisLoc() const
Returns the location of the ellipsis of a variadic function.
static bool classofKind(Kind K)
void setHasSkippedBody(bool Skipped=true)
SourceRange getReturnTypeSourceRange() const
Attempt to compute an informative source range covering the function return type.
bool isDestroyingOperatorDelete() const
Determine whether this is a destroying operator delete.
static FunctionDecl * CreateDeserialized(ASTContext &C, GlobalDeclID ID)
unsigned getBuiltinID(bool ConsiderWrapperFunctions=false) const
Returns a value indicating whether this function corresponds to a builtin function.
void setUsesSEHTry(bool UST)
param_iterator param_end()
StringLiteral * getDeletedMessage() const
Get the message that indicates why this function was deleted.
SourceLocation getPointOfInstantiation() const
Retrieve the (first) point of instantiation of a function template specialization or a member of a cl...
bool isMemberLikeConstrainedFriend() const
Determine whether a function is a friend function that cannot be redeclared outside of its class,...
bool hasCXXExplicitFunctionObjectParameter() const
bool isInlined() const
Determine whether this function should be inlined, because it is either marked "inline" or "constexpr...
void setIsMultiVersion(bool V=true)
Sets the multiversion state for this declaration and all of its redeclarations.
bool UsesFPIntrin() const
Determine whether the function was declared in source context that requires constrained FP intrinsics...
SourceLocation getDefaultLoc() const
void setInstantiationOfMemberFunction(FunctionDecl *FD, TemplateSpecializationKind TSK)
Specify that this record is an instantiation of the member function FD.
bool usesSEHTry() const
Indicates the function uses __try.
void setHasWrittenPrototype(bool P=true)
State that this function has a written prototype.
bool isNoReturn() const
Determines whether this function is known to be 'noreturn', through an attribute on its declaration o...
QualType getReturnType() const
ArrayRef< ParmVarDecl * > parameters() const
bool isCPUSpecificMultiVersion() const
True if this function is a multiversioned processor specific function as a part of the cpu_specific/c...
FunctionDecl * getTemplateInstantiationPattern(bool ForDefinition=true) const
Retrieve the function declaration from which this function could be instantiated, if it is an instant...
bool isMSExternInline() const
The combination of the extern and inline keywords under MSVC forces the function to be required.
bool isExplicitlyDefaulted() const
Whether this function is explicitly defaulted.
bool isTrivial() const
Whether this function is "trivial" in some specialized C++ senses.
bool instantiationIsPending() const
Whether the instantiation of this function is pending.
unsigned getMinRequiredExplicitArguments() const
Returns the minimum number of non-object arguments needed to call this function.
const FunctionDecl * getCanonicalDecl() const
bool BodyContainsImmediateEscalatingExpressions() const
LanguageLinkage getLanguageLinkage() const
Compute the language linkage.
FunctionTemplateDecl * getPrimaryTemplate() const
Retrieve the primary template that this function template specialization either specializes or was in...
MutableArrayRef< ParmVarDecl * >::iterator param_iterator
FunctionDecl * getNextRedeclarationImpl() override
Returns the next redeclaration or itself if this is the only decl.
bool hasWrittenPrototype() const
Whether this function has a written prototype.
void setWillHaveBody(bool V=true)
void setDeclarationNameLoc(DeclarationNameLoc L)
bool isReplaceableGlobalAllocationFunction(UnsignedOrNone *AlignmentParam=nullptr, bool *IsNothrow=nullptr) const
Determines whether this function is one of the replaceable global allocation functions: void *operato...
MemberSpecializationInfo * getMemberSpecializationInfo() const
If this function is an instantiation of a member function of a class template specialization,...
bool hasPrototype() const
Whether this function has a prototype, either because one was explicitly written or because it was "i...
FunctionTemplateSpecializationInfo * getTemplateSpecializationInfo() const
If this function is actually a function template specialization, retrieve information about this func...
void setUsesFPIntrin(bool I)
Set whether the function was declared in source context that requires constrained FP intrinsics.
void setDefaultLoc(SourceLocation NewLoc)
FunctionDecl * getCanonicalDecl() override
Retrieves the "canonical" declaration of the given declaration.
void getAssociatedConstraints(SmallVectorImpl< AssociatedConstraint > &ACs) const
Get the associated-constraints of this function declaration.
FunctionTypeLoc getFunctionTypeLoc() const
Find the source location information for how the type of this function was written.
void setInstantiatedFromMemberTemplate(bool Val=true)
MutableArrayRef< ParmVarDecl * > parameters()
param_iterator param_begin()
FunctionDecl * getPreviousDeclImpl() override
Implementation of getPreviousDecl(), to be overridden by any subclass that has a redeclaration chain.
const ParmVarDecl * getNonObjectParameter(unsigned I) const
bool isVariadic() const
Whether this function is variadic.
bool doesThisDeclarationHaveABody() const
Returns whether this specific declaration of the function has a body.
bool isConstexprSpecified() const
DependentFunctionTemplateSpecializationInfo * getDependentSpecializationInfo() const
bool isDeleted() const
Whether this function has been deleted.
void setBodyContainsImmediateEscalatingExpressions(bool Set)
const TemplateArgumentList * getTemplateSpecializationArgs() const
Retrieve the template arguments used to produce this function template specialization from the primar...
FunctionEffectsRef getFunctionEffects() const
static DeclContext * castToDeclContext(const FunctionDecl *D)
SourceRange getExceptionSpecSourceRange() const
Attempt to compute an informative source range covering the function exception specification,...
bool hasBody() const override
Returns true if this Decl represents a declaration for a body of code, such as a function or method d...
bool isMSVCRTEntryPoint() const
Determines whether this function is a MSVCRT user defined entry point.
unsigned getODRHash()
Returns ODRHash of the function.
TemplateSpecializationKind getTemplateSpecializationKindForInstantiation() const
Determine the kind of template specialization this function represents for the purpose of template in...
ArrayRef< ParmVarDecl * >::const_iterator param_const_iterator
FunctionDecl(Kind DK, ASTContext &C, DeclContext *DC, SourceLocation StartLoc, const DeclarationNameInfo &NameInfo, QualType T, TypeSourceInfo *TInfo, StorageClass S, bool UsesFPIntrin, bool isInlineSpecified, ConstexprSpecKind ConstexprKind, const AssociatedConstraint &TrailingRequiresClause)
bool isTemplateInstantiation() const
Determines if the given function was instantiated from a function template.
void setInlineSpecified(bool I)
Set whether the "inline" keyword was specified for this function.
unsigned getNumNonObjectParams() const
TemplatedKind
The kind of templated function a FunctionDecl can be.
@ TK_MemberSpecialization
@ TK_DependentNonTemplate
@ TK_FunctionTemplateSpecialization
@ TK_DependentFunctionTemplateSpecialization
redeclarable_base::redecl_range redecl_range
StorageClass getStorageClass() const
Returns the storage class as written in the source.
FunctionDecl * getMostRecentDeclImpl() override
Implementation of getMostRecentDecl(), to be overridden by any subclass that has a redeclaration chai...
redeclarable_base::redecl_iterator redecl_iterator
bool isOutOfLine() const override
Determine whether this is or was instantiated from an out-of-line definition of a member function.
bool isInlineBuiltinDeclaration() const
Determine if this function provides an inline implementation of a builtin.
bool FriendConstraintRefersToEnclosingTemplate() const
ParmVarDecl * getParamDecl(unsigned i)
TemplatedKind getTemplatedKind() const
What kind of templated function this is.
void setInstantiatedFromDecl(FunctionDecl *FD)
Specify that this function declaration was instantiated from a FunctionDecl FD.
bool isConstexpr() const
Whether this is a (C++11) constexpr function or constexpr constructor.
bool isDeletedAsWritten() const
bool isReservedGlobalPlacementOperator() const
Determines whether this operator new or delete is one of the reserved global placement operators: voi...
ParmVarDecl * getNonObjectParameter(unsigned I)
void setHasInheritedPrototype(bool P=true)
State that this function inherited its prototype from a previous declaration.
void setDependentTemplateSpecialization(ASTContext &Context, const UnresolvedSetImpl &Templates, const TemplateArgumentListInfo *TemplateArgs)
Specifies that this function declaration is actually a dependent function template specialization.
bool isInExternCContext() const
Determines whether this function's context is, or is nested within, a C++ extern "C" linkage spec.
static constexpr unsigned RequiredTypeAwareNewParameterCount
Count of mandatory parameters for type aware operator new.
bool isPureVirtual() const
Whether this virtual function is pure, i.e.
bool isImplicitlyInstantiable() const
Determines whether this function is a function template specialization or a member of a class templat...
bool isExternC() const
Determines whether this function is a function with external, C linkage.
Stmt * getBody() const override
getBody - If this Decl represents a declaration for a body of code, such as a function or method defi...
bool isLateTemplateParsed() const
Whether this templated function will be late parsed.
LazyDeclStmtPtr Body
The body of the function.
bool hasImplicitReturnZero() const
Whether falling off this function implicitly returns null/zero.
bool isImmediateEscalating() const
void setVirtualAsWritten(bool V)
State that this function is marked as virtual explicitly.
bool hasSkippedBody() const
True if the function was a definition but its body was skipped.
void setIsDestroyingOperatorDelete(bool IsDestroyingDelete)
static bool classof(const Decl *D)
void setLateTemplateParsed(bool ILT=true)
State that this templated function will be late parsed.
bool isUsableAsGlobalAllocationFunctionInConstantEvaluation(UnsignedOrNone *AlignmentParam=nullptr, bool *IsNothrow=nullptr) const
Determines whether this function is one of the replaceable global allocation functions described in i...
DefaultedOrDeletedFunctionInfo * DefaultedOrDeletedInfo
Information about a future defaulted function definition.
FunctionDecl * getDefinition()
Get the definition for this declaration.
bool isTypeAwareOperatorNewOrDelete() const
Determine whether this is a type aware operator new or delete.
bool isInExternCXXContext() const
Determines whether this function's context is, or is nested within, a C++ extern "C++" linkage spec.
bool isMain() const
Determines whether this function is "main", which is the entry point into an executable program.
void setImplicitlyInline(bool I=true)
Flag that this function is implicitly inline.
bool isTargetVersionMultiVersion() const
True if this function is a multiversioned dispatch function as a part of the target-version functiona...
void setTrivialForCall(bool IT)
void setIsTypeAwareOperatorNewOrDelete(bool IsTypeAwareOperator=true)
void setLazyBody(uint64_t Offset)
bool isThisDeclarationInstantiatedFromAFriendDefinition() const
Determine whether this specific declaration of the function is a friend declaration that was instanti...
void setRangeEnd(SourceLocation E)
bool isCPUDispatchMultiVersion() const
True if this function is a multiversioned dispatch function as a part of the cpu_specific/cpu_dispatc...
bool isDefaulted() const
Whether this function is defaulted.
bool isIneligibleOrNotSelected() const
bool isReferenceableKernel() const
void setIneligibleOrNotSelected(bool II)
SourceRange getSourceRange() const override LLVM_READONLY
Source range that this declaration covers.
bool isOverloadedOperator() const
Whether this function declaration represents an C++ overloaded operator, e.g., "operator+".
FunctionDecl * getInstantiatedFromDecl() const
void setTemplateSpecializationKind(TemplateSpecializationKind TSK, SourceLocation PointOfInstantiation=SourceLocation())
Determine what kind of template instantiation this function represents.
const IdentifierInfo * getLiteralIdentifier() const
getLiteralIdentifier - The literal suffix identifier this function represents, if any.
OverloadedOperatorKind getOverloadedOperator() const
getOverloadedOperator - Which C++ overloaded operator this function represents, if any.
void setConstexprKind(ConstexprSpecKind CSK)
TemplateSpecializationKind getTemplateSpecializationKind() const
Determine what kind of template instantiation this function represents.
param_const_iterator param_begin() const
bool doesDeclarationForceExternallyVisibleDefinition() const
For a function declaration in C or C++, determine whether this declaration causes the definition to b...
void setDefaulted(bool D=true)
bool isTargetMultiVersion() const
True if this function is a multiversioned dispatch function as a part of the target functionality.
bool isUserProvided() const
True if this method is user-declared and was not deleted or defaulted on its first declaration.
QualType getDeclaredReturnType() const
Get the declared return type, which may differ from the actual return type if the return type is dedu...
void setStorageClass(StorageClass SClass)
Sets the storage class as written in the source.
bool isVirtualAsWritten() const
Whether this function is marked as virtual explicitly.
bool isGlobal() const
Determines whether this is a global function.
bool hasOneParamOrDefaultArgs() const
Determine whether this function has a single parameter, or multiple parameters where all but the firs...
void setDeletedAsWritten(bool D=true, StringLiteral *Message=nullptr)
void setFunctionTemplateSpecialization(FunctionTemplateDecl *Template, TemplateArgumentList *TemplateArgs, void *InsertPos, TemplateSpecializationKind TSK=TSK_ImplicitInstantiation, TemplateArgumentListInfo *TemplateArgsAsWritten=nullptr, SourceLocation PointOfInstantiation=SourceLocation())
Specify that this function declaration is actually a function template specialization.
void setExplicitlyDefaulted(bool ED=true)
State that this function is explicitly defaulted.
param_const_iterator param_end() const
bool hasInheritedPrototype() const
Whether this function inherited its prototype from a previous declaration.
bool isTargetMultiVersionDefault() const
True if this function is the default version of a multiversioned dispatch function as a part of the t...
FunctionDecl * getInstantiatedFromMemberFunction() const
If this function is an instantiation of a member function of a class template specialization,...
bool isInlineDefinitionExternallyVisible() const
For an inline function definition in C, or for a gnu_inline function in C++, determine whether the de...
unsigned getNumParams() const
Return the number of parameters this function must have based on its FunctionType.
size_t param_size() const
DeclarationNameInfo getNameInfo() const
SourceRange getParametersSourceRange() const
Attempt to compute an informative source range covering the function parameters, including the ellips...
static FunctionDecl * castFromDeclContext(const DeclContext *DC)
void setHasImplicitReturnZero(bool IRZ)
State that falling off this function implicitly returns null/zero.
bool isInlineSpecified() const
Determine whether the "inline" keyword was specified for this function.
MultiVersionKind getMultiVersionKind() const
Gets the kind of multiversioning attribute this declaration has.
DefaultedOrDeletedFunctionInfo * getDefalutedOrDeletedInfo() const
void getNameForDiagnostic(raw_ostream &OS, const PrintingPolicy &Policy, bool Qualified) const override
Appends a human-readable name for this declaration into the given stream.
void setParams(ArrayRef< ParmVarDecl * > NewParamInfo)
bool willHaveBody() const
True if this function will eventually have a body, once it's fully parsed.
const ASTTemplateArgumentListInfo * getTemplateSpecializationArgsAsWritten() const
Retrieve the template argument list as written in the sources, if any.
QualType getCallResultType() const
Determine the type of an expression that calls this function.
bool isInstantiatedFromMemberTemplate() const
An immutable set of FunctionEffects and possibly conditions attached to them.
Represents a prototype with parameter type info, e.g.
ExceptionSpecificationType getExceptionSpecType() const
Get the kind of exception specification on this function.
SourceLocation getEllipsisLoc() const
Declaration of a template function.
Provides information about a function template specialization, which is a FunctionDecl that has been ...
Wrapper for source info for functions.
FunctionType - C99 6.7.5.3 - Function Declarators.
HLSLBufferDecl - Represent a cbuffer or tbuffer declaration.
static HLSLBufferDecl * castFromDeclContext(const DeclContext *DC)
buffer_decl_iterator buffer_decls_begin() const
static DeclContext * castToDeclContext(const HLSLBufferDecl *D)
const CXXRecordDecl * getLayoutStruct() const
SourceLocation getLBraceLoc() const
SourceLocation getLocStart() const LLVM_READONLY
void addLayoutStruct(CXXRecordDecl *LS)
bool buffer_decls_empty()
llvm::concat_iterator< Decl *const, SmallVector< Decl * >::const_iterator, decl_iterator > buffer_decl_iterator
SourceLocation getRBraceLoc() const
SourceRange getSourceRange() const override LLVM_READONLY
Source range that this declaration covers.
void setRBraceLoc(SourceLocation L)
bool hasValidPackoffset() const
static bool classofKind(Kind K)
llvm::iterator_range< buffer_decl_iterator > buffer_decl_range
void setHasValidPackoffset(bool PO)
static HLSLBufferDecl * CreateDeserialized(ASTContext &C, GlobalDeclID ID)
buffer_decl_iterator buffer_decls_end() const
static HLSLBufferDecl * CreateDefaultCBuffer(ASTContext &C, DeclContext *LexicalParent, ArrayRef< Decl * > DefaultCBufferDecls)
buffer_decl_range buffer_decls() const
static bool classof(const Decl *D)
static HLSLRootSignatureDecl * CreateDeserialized(ASTContext &C, GlobalDeclID ID)
ArrayRef< llvm::hlsl::rootsig::RootElement > getRootElements() const
llvm::dxbc::RootSignatureVersion getVersion() const
static bool classofKind(Kind K)
static bool classof(const Decl *D)
One of these records is kept for each identifier that is lexed.
StringRef getName() const
Return the actual identifier string.
static bool classofKind(Kind K)
ImplicitParamDecl(ASTContext &C, DeclContext *DC, SourceLocation IdLoc, const IdentifierInfo *Id, QualType Type, ImplicitParamKind ParamKind)
ImplicitParamKind getParameterKind() const
Returns the implicit parameter kind.
static bool classof(const Decl *D)
ImplicitParamDecl(ASTContext &C, QualType Type, ImplicitParamKind ParamKind)
static ImplicitParamDecl * CreateDeserialized(ASTContext &C, GlobalDeclID ID)
Describes a module import declaration, which makes the contents of the named module visible in the cu...
SourceRange getSourceRange() const override LLVM_READONLY
Source range that this declaration covers.
static ImportDecl * CreateDeserialized(ASTContext &C, GlobalDeclID ID, unsigned NumLocations)
Create a new, deserialized module import declaration.
static bool classof(const Decl *D)
ArrayRef< SourceLocation > getIdentifierLocs() const
Retrieves the locations of each of the identifiers that make up the complete module name in the impor...
Module * getImportedModule() const
Retrieve the module that was imported by the import declaration.
static bool classofKind(Kind K)
static ImportDecl * CreateImplicit(ASTContext &C, DeclContext *DC, SourceLocation StartLoc, Module *Imported, SourceLocation EndLoc)
Create a new module import declaration for an implicitly-generated import.
Represents a field injected from an anonymous union/struct into the parent scope.
const IndirectFieldDecl * getCanonicalDecl() const
static bool classofKind(Kind K)
static bool classof(const Decl *D)
FieldDecl * getAnonField() const
static IndirectFieldDecl * CreateDeserialized(ASTContext &C, GlobalDeclID ID)
unsigned getChainingSize() const
IndirectFieldDecl * getCanonicalDecl() override
Retrieves the "canonical" declaration of the given declaration.
chain_iterator chain_end() const
chain_iterator chain_begin() const
ArrayRef< NamedDecl * > chain() const
VarDecl * getVarDecl() const
ArrayRef< NamedDecl * >::const_iterator chain_iterator
Represents the declaration of a label.
static bool classofKind(Kind K)
void setMSAsmLabel(StringRef Name)
bool isResolvedMSAsmLabel() const
static bool classof(const Decl *D)
void setLocStart(SourceLocation L)
LabelStmt * getStmt() const
StringRef getMSAsmLabel() const
void setStmt(LabelStmt *T)
void setMSAsmLabelResolved()
static LabelDecl * CreateDeserialized(ASTContext &C, GlobalDeclID ID)
bool isMSAsmLabel() const
SourceRange getSourceRange() const override LLVM_READONLY
Source range that this declaration covers.
LabelStmt - Represents a label, which has a substatement.
Keeps track of the various options that can be enabled, which controls the dialect of C or C++ that i...
Visibility getVisibility() const
Provides information a specialization of a member of a class template, which may be a member function...
Provides common interface for the Decls that cannot be redeclared, but can be merged if the same decl...
FieldDecl * getFirstDecl()
Return the first declaration of this declaration or itself if this is the only declaration.
Describes a module or submodule.
This represents a decl that may have a name.
NamedDecl * getUnderlyingDecl()
Looks through UsingDecls and ObjCCompatibleAliasDecls for the underlying named decl.
ExplicitVisibilityKind
Kinds of explicit visibility.
@ VisibilityForValue
Do an LV computation for, ultimately, a non-type declaration.
@ VisibilityForType
Do an LV computation for, ultimately, a type.
Linkage getLinkageInternal() const
Determine what kind of linkage this entity has.
IdentifierInfo * getIdentifier() const
Get the identifier that names this declaration, if there is one.
NamedDecl(Kind DK, DeclContext *DC, SourceLocation L, DeclarationName N)
LinkageInfo getLinkageAndVisibility() const
Determines the linkage and visibility of this entity.
bool isLinkageValid() const
True if the computed linkage is valid.
StringRef getName() const
Get the name of identifier for this declaration as a StringRef.
bool isPlaceholderVar(const LangOptions &LangOpts) const
Visibility getVisibility() const
Determines the visibility of this entity.
bool hasLinkageBeenComputed() const
True if something has required us to compute the linkage of this declaration.
bool hasExternalFormalLinkage() const
True if this decl has external linkage.
static bool classof(const Decl *D)
DeclarationName getDeclName() const
Get the actual, stored name of the declaration, which may be a special name.
std::string getQualifiedNameAsString() const
std::string getNameAsString() const
Get a human-readable name for the declaration, even if it is one of the special kinds of names (C++ c...
std::optional< Visibility > getExplicitVisibility(ExplicitVisibilityKind kind) const
If visibility was explicitly specified for this declaration, return that visibility.
NamedDecl * getMostRecentDecl()
virtual void getNameForDiagnostic(raw_ostream &OS, const PrintingPolicy &Policy, bool Qualified) const
Appends a human-readable name for this declaration into the given stream.
bool declarationReplaces(const NamedDecl *OldD, bool IsKnownNewer=true) const
Determine whether this declaration, if known to be well-formed within its context,...
ObjCStringFormatFamily getObjCFStringFormattingFamily() const
Linkage getFormalLinkage() const
Get the linkage from a semantic point of view.
void printQualifiedName(raw_ostream &OS) const
Returns a human-readable qualified name for this declaration, like A::B::i, for i being member of nam...
static bool classofKind(Kind K)
virtual void printName(raw_ostream &OS, const PrintingPolicy &Policy) const
Pretty-print the unqualified name of this declaration.
bool isCXXInstanceMember() const
Determine whether the given declaration is an instance member of a C++ class.
bool hasLinkage() const
Determine whether this declaration has linkage.
const NamedDecl * getMostRecentDecl() const
bool isExternallyVisible() const
void setDeclName(DeclarationName N)
Set the name of this declaration.
ReservedIdentifierStatus isReserved(const LangOptions &LangOpts) const
Determine if the declaration obeys the reserved identifier rules of the given language.
bool isCXXClassMember() const
Determine whether this declaration is a C++ class member.
const NamedDecl * getUnderlyingDecl() const
void printNestedNameSpecifier(raw_ostream &OS) const
Print only the nested name specifier part of a fully-qualified name, including the '::' at the end.
bool isExternallyDeclarable() const
Determine whether this declaration can be redeclared in a different translation unit.
Represents C++ namespaces and their aliases.
const NamespaceDecl * getNamespace() const
static bool classof(const Decl *D)
NamespaceDecl * getNamespace()
static bool classofKind(Kind K)
Represent a C++ namespace.
NamespaceDecl * getCanonicalDecl() override
Retrieves the canonical declaration of this namespace.
redeclarable_base::redecl_iterator redecl_iterator
SourceLocation getRBraceLoc() const
const NamespaceDecl * getCanonicalDecl() const
void setAnonymousNamespace(NamespaceDecl *D)
static bool classofKind(Kind K)
void setNested(bool Nested)
Set whether this is a nested namespace declaration.
static DeclContext * castToDeclContext(const NamespaceDecl *D)
void setLocStart(SourceLocation L)
SourceLocation getBeginLoc() const LLVM_READONLY
bool isAnonymousNamespace() const
Returns true if this is an anonymous namespace declaration.
bool isInline() const
Returns true if this is an inline namespace declaration.
static bool classof(const Decl *D)
static NamespaceDecl * castFromDeclContext(const DeclContext *DC)
SourceRange getSourceRange() const override LLVM_READONLY
Source range that this declaration covers.
void setInline(bool Inline)
Set whether this is an inline namespace declaration.
NamespaceDecl * getAnonymousNamespace() const
Retrieve the anonymous namespace that inhabits this namespace, if any.
bool isNested() const
Returns true if this is a nested namespace declaration.
static NamespaceDecl * CreateDeserialized(ASTContext &C, GlobalDeclID ID)
void setRBraceLoc(SourceLocation L)
redeclarable_base::redecl_range redecl_range
bool isRedundantInlineQualifierFor(DeclarationName Name) const
Returns true if the inline qualifier for Name is redundant.
A C++ nested-name-specifier augmented with source location information.
NestedNameSpecifier getNestedNameSpecifier() const
Retrieve the nested-name-specifier to which this instance refers.
Represents a C++ nested name specifier, such as "\::std::vector<int>::".
Represents a partial function definition.
ImplicitParamDecl * getParam(unsigned i) const
const ImplicitParamDecl *const * parameter_const_iterator
parameter_const_range parameters() const
static bool classof(const Decl *D)
static OutlinedFunctionDecl * castFromDeclContext(const DeclContext *DC)
static DeclContext * castToDeclContext(const OutlinedFunctionDecl *D)
void setNothrow(bool Nothrow=true)
parameter_const_iterator param_end() const
static bool classofKind(Kind K)
llvm::iterator_range< parameter_const_iterator > parameter_const_range
static OutlinedFunctionDecl * CreateDeserialized(ASTContext &C, GlobalDeclID ID, unsigned NumParams)
Stmt * getBody() const override
getBody - If this Decl represents a declaration for a body of code, such as a function or method defi...
void setParam(unsigned i, ImplicitParamDecl *P)
parameter_const_iterator param_begin() const
unsigned getNumParams() const
Represents a parameter to a function.
bool isKNRPromoted() const
True if the value passed to this parameter must undergo K&R-style default argument promotion:
unsigned getFunctionScopeIndex() const
Returns the index of this parameter in its prototype or method scope.
void setObjCDeclQualifier(ObjCDeclQualifier QTVal)
static bool classofKind(Kind K)
void setDefaultArg(Expr *defarg)
static ParmVarDecl * CreateDeserialized(ASTContext &C, GlobalDeclID ID)
SourceLocation getExplicitObjectParamThisLoc() const
void setUnparsedDefaultArg()
Specify that this parameter has an unparsed default argument.
ParmVarDecl(Kind DK, ASTContext &C, DeclContext *DC, SourceLocation StartLoc, SourceLocation IdLoc, const IdentifierInfo *Id, QualType T, TypeSourceInfo *TInfo, StorageClass S, Expr *DefArg)
bool hasUnparsedDefaultArg() const
Determines whether this parameter has a default argument that has not yet been parsed.
SourceRange getDefaultArgRange() const
Retrieve the source range that covers the entire default argument.
void setUninstantiatedDefaultArg(Expr *arg)
bool isObjCMethodParameter() const
ObjCDeclQualifier getObjCDeclQualifier() const
static constexpr unsigned getMaxFunctionScopeDepth()
const Expr * getDefaultArg() const
void setScopeInfo(unsigned scopeDepth, unsigned parameterIndex)
bool hasUninstantiatedDefaultArg() const
void setObjCMethodScopeInfo(unsigned parameterIndex)
bool isDestroyedInCallee() const
Determines whether this parameter is destroyed in the callee function.
bool hasInheritedDefaultArg() const
bool isExplicitObjectParameter() const
void setKNRPromoted(bool promoted)
QualType getOriginalType() const
const Expr * getUninstantiatedDefaultArg() const
void setExplicitObjectParameterLoc(SourceLocation Loc)
Expr * getUninstantiatedDefaultArg()
bool hasDefaultArg() const
Determines whether this parameter has a default argument, either parsed or not.
unsigned getFunctionScopeDepth() const
void setHasInheritedDefaultArg(bool I=true)
void setOwningFunction(DeclContext *FD)
Sets the function declaration that owns this ParmVarDecl.
SourceRange getSourceRange() const override LLVM_READONLY
Source range that this declaration covers.
static bool classof(const Decl *D)
Represents a #pragma detect_mismatch line.
StringRef getName() const
static PragmaDetectMismatchDecl * CreateDeserialized(ASTContext &C, GlobalDeclID ID, unsigned NameValueSize)
StringRef getValue() const
static bool classofKind(Kind K)
static bool classof(const Decl *D)
A (possibly-)qualified type.
Represents a struct/union/class.
bool hasLoadedFieldsFromExternalStorage() const
unsigned getODRHash()
Get precomputed ODRHash or add a new one.
bool hasNonTrivialToPrimitiveDestructCUnion() const
bool isLambda() const
Determine whether this record is a class describing a lambda function object.
bool hasNonTrivialToPrimitiveCopyCUnion() const
bool isMsStruct(const ASTContext &C) const
Get whether or not this is an ms_struct which can be turned on with an attribute, pragma,...
void setAnonymousStructOrUnion(bool Anon)
bool canPassInRegisters() const
Determine whether this class can be passed in registers.
RecordArgPassingKind getArgPassingRestrictions() const
bool hasVolatileMember() const
bool hasFlexibleArrayMember() const
bool hasNonTrivialToPrimitiveDefaultInitializeCUnion() const
const FieldDecl * findFirstNamedDataMember() const
Finds the first data member which has a name.
const RecordDecl * getMostRecentDecl() const
void setArgPassingRestrictions(RecordArgPassingKind Kind)
void setNonTrivialToPrimitiveCopy(bool V)
bool hasObjectMember() const
bool isNonTrivialToPrimitiveDestroy() const
bool isNonTrivialToPrimitiveCopy() const
bool isCapturedRecord() const
Determine whether this record is a record for captured variables in CapturedStmt construct.
void setHasNonTrivialToPrimitiveCopyCUnion(bool V)
field_iterator field_end() const
field_range fields() const
bool isRandomized() const
void setHasNonTrivialToPrimitiveDestructCUnion(bool V)
static bool classofKind(Kind K)
void setHasFlexibleArrayMember(bool V)
void setParamDestroyedInCallee(bool V)
void setNonTrivialToPrimitiveDestroy(bool V)
void setHasObjectMember(bool val)
void setHasVolatileMember(bool val)
void setHasNonTrivialToPrimitiveDefaultInitializeCUnion(bool V)
void reorderDecls(const SmallVectorImpl< Decl * > &Decls)
void setIsRandomized(bool V)
bool isParamDestroyedInCallee() const
static RecordDecl * CreateDeserialized(const ASTContext &C, GlobalDeclID ID)
bool mayInsertExtraPadding(bool EmitRemark=false) const
Whether we are allowed to insert extra padding between fields.
static bool classof(const Decl *D)
RecordDecl * getMostRecentDecl()
const RecordDecl * getPreviousDecl() const
bool isOrContainsUnion() const
Returns whether this record is a union, or contains (at any nesting level) a union member.
virtual void completeDefinition()
Note that the definition of this type is now complete.
llvm::iterator_range< specific_decl_iterator< FieldDecl > > field_range
RecordDecl * getDefinition() const
Returns the RecordDecl that actually defines this struct/union/class.
bool hasUninitializedExplicitInitFields() const
void setCapturedRecord()
Mark the record as a record for captured variables in CapturedStmt construct.
specific_decl_iterator< FieldDecl > field_iterator
void setHasUninitializedExplicitInitFields(bool V)
RecordDecl * getPreviousDecl()
void setNonTrivialToPrimitiveDefaultInitialize(bool V)
RecordDecl * getDefinitionOrSelf() const
bool isNonTrivialToPrimitiveDefaultInitialize() const
Functions to query basic properties of non-trivial C structs.
bool isAnonymousStructOrUnion() const
Whether this is an anonymous struct or union.
void setHasLoadedFieldsFromExternalStorage(bool val) const
field_iterator field_begin() const
Provides common interface for the Decls that can be redeclared.
TranslationUnitDecl * getFirstDecl()
Return the first declaration of this declaration or itself if this is the only declaration.
TranslationUnitDecl * getNextRedeclaration() const
TranslationUnitDecl * getPreviousDecl()
Return the previous declaration of this declaration or NULL if this is the first declaration.
redecl_iterator redecls_end() const
llvm::iterator_range< redecl_iterator > redecl_range
TranslationUnitDecl * getMostRecentDecl()
Returns the most recent (re)declaration of this declaration.
void setPreviousDecl(decl_type *PrevDecl)
Set the previous declaration.
bool isFirstDecl() const
True if this is the first declaration in its redeclaration chain.
redecl_iterator redecls_begin() const
redecl_range redecls() const
Returns an iterator range for all the redeclarations of the same decl.
Encodes a location in the source.
bool isValid() const
Return true if this is a valid SourceLocation object.
A trivial tuple used to represent a source range.
Stmt - This represents one statement.
The streaming interface shared between DiagnosticBuilder and PartialDiagnostic.
void AddTaggedVal(uint64_t V, DiagnosticsEngine::ArgumentKind Kind) const
StringLiteral - This represents a string literal expression, e.g.
Represents the declaration of a struct/union/class/enum.
void setTagKind(TagKind TK)
void setCompleteDefinitionRequired(bool V=true)
True if this complete decl is required to be complete for some existing use.
static TagDecl * castFromDeclContext(const DeclContext *DC)
SourceRange getBraceRange() const
bool isBeingDefined() const
Return true if this decl is currently being defined.
void demoteThisDefinitionToDeclaration()
Mark a definition as a declaration and maintain information it was a definition.
TagDecl * getMostRecentDeclImpl() override
Implementation of getMostRecentDecl(), to be overridden by any subclass that has a redeclaration chai...
TagDecl * getDefinition() const
Returns the TagDecl that actually defines this struct/union/class/enum.
bool isThisDeclarationADefinition() const
Return true if this declaration is a completion definition of the type.
void setEmbeddedInDeclarator(bool isInDeclarator)
True if this tag declaration is "embedded" (i.e., defined or declared for the very first time) in the...
SourceLocation getInnerLocStart() const
Return SourceLocation representing start of source range ignoring outer template declarations.
bool isEmbeddedInDeclarator() const
True if this tag declaration is "embedded" (i.e., defined or declared for the very first time) in the...
bool isStructureOrClass() const
StringRef getKindName() const
bool isCompleteDefinition() const
Return true if this decl has its body fully specified.
NestedNameSpecifierLoc getQualifierLoc() const
Retrieve the nested-name-specifier (with source-location information) that qualifies the name of this...
redeclarable_base::redecl_iterator redecl_iterator
TypedefNameDecl * getTypedefNameForAnonDecl() const
static bool classofKind(Kind K)
void startDefinition()
Starts the definition of this tag declaration.
TagDecl * getCanonicalDecl() override
Retrieves the "canonical" declaration of the given declaration.
void setTypedefNameForAnonDecl(TypedefNameDecl *TDD)
SourceLocation getOuterLocStart() const
Return SourceLocation representing start of source range taking into account any outer template decla...
bool isCompleteDefinitionRequired() const
Return true if this complete decl is required to be complete for some existing use.
SourceRange getSourceRange() const override LLVM_READONLY
Source range that this declaration covers.
bool isEntityBeingDefined() const
Determines whether this entity is in the process of being defined.
bool isFreeStanding() const
True if this tag is free standing, e.g. "struct foo;".
void setBeingDefined(bool V=true)
True if this decl is currently being defined.
void setQualifierInfo(NestedNameSpecifierLoc QualifierLoc)
void setTemplateParameterListsInfo(ASTContext &Context, ArrayRef< TemplateParameterList * > TPLists)
void completeDefinition()
Completes the definition of this tag declaration.
void printName(raw_ostream &OS, const PrintingPolicy &Policy) const override
Pretty-print the unqualified name of this declaration.
void setTypeForDecl(const Type *TD)=delete
static bool classof(const Decl *D)
NestedNameSpecifier getQualifier() const
Retrieve the nested-name-specifier that qualifies the name of this declaration, if it was present in ...
bool hasNameForLinkage() const
Is this tag type named, either directly or via being defined in a typedef of this type?
TemplateParameterList * getTemplateParameterList(unsigned i) const
void setFreeStanding(bool isFreeStanding=true)
True if this tag is free standing, e.g. "struct foo;".
TagKind getTagKind() const
TagDecl * getNextRedeclarationImpl() override
Returns the next redeclaration or itself if this is the only decl.
TagDecl * getPreviousDeclImpl() override
Implementation of getPreviousDecl(), to be overridden by any subclass that has a redeclaration chain.
bool isThisDeclarationADemotedDefinition() const
Whether this declaration was a definition in some module but was forced to be a declaration.
unsigned getNumTemplateParameterLists() const
redeclarable_base::redecl_range redecl_range
static DeclContext * castToDeclContext(const TagDecl *D)
bool isDependentType() const
Whether this declaration declares a type that is dependent, i.e., a type that somehow depends on temp...
const Type * getTypeForDecl() const =delete
void setBraceRange(SourceRange R)
TagDecl * getDefinitionOrSelf() const
TagDecl(Kind DK, TagKind TK, const ASTContext &C, DeclContext *DC, SourceLocation L, IdentifierInfo *Id, TagDecl *PrevDecl, SourceLocation StartL)
void setCompleteDefinition(bool V=true)
True if this decl has its body fully specified.
A convenient class for passing around template argument information.
A template argument list.
Stores a list of template parameters for a TemplateDecl and its derived classes.
A declaration that models statements at global scope.
static bool classofKind(Kind K)
const Stmt * getStmt() const
void setSemiMissing(bool Missing=true)
static bool classof(const Decl *D)
static TopLevelStmtDecl * CreateDeserialized(ASTContext &C, GlobalDeclID ID)
bool isSemiMissing() const
static DeclContext * castToDeclContext(const TopLevelStmtDecl *D)
static TopLevelStmtDecl * castFromDeclContext(const DeclContext *DC)
SourceRange getSourceRange() const override LLVM_READONLY
Source range that this declaration covers.
The top declaration context.
static TranslationUnitDecl * castFromDeclContext(const DeclContext *DC)
static DeclContext * castToDeclContext(const TranslationUnitDecl *D)
redeclarable_base::redecl_range redecl_range
const TranslationUnitDecl * getCanonicalDecl() const
static bool classofKind(Kind K)
NamespaceDecl * getAnonymousNamespace() const
ASTContext & getASTContext() const
redeclarable_base::redecl_iterator redecl_iterator
static bool classof(const Decl *D)
TranslationUnitDecl * getCanonicalDecl() override
Retrieves the canonical declaration of this translation unit.
void setAnonymousNamespace(NamespaceDecl *D)
Represents the declaration of a typedef-name via a C++11 alias-declaration.
static TypeAliasDecl * CreateDeserialized(ASTContext &C, GlobalDeclID ID)
TypeAliasTemplateDecl * getDescribedAliasTemplate() const
void setDescribedAliasTemplate(TypeAliasTemplateDecl *TAT)
static bool classof(const Decl *D)
static bool classofKind(Kind K)
SourceRange getSourceRange() const override LLVM_READONLY
Source range that this declaration covers.
Declaration of an alias template.
Represents a declaration of a type.
void setLocStart(SourceLocation L)
static bool classofKind(Kind K)
void setTypeForDecl(const Type *TD)
const Type * getTypeForDecl() const
static bool classof(const Decl *D)
TypeDecl(Kind DK, DeclContext *DC, SourceLocation L, const IdentifierInfo *Id, SourceLocation StartL=SourceLocation())
SourceRange getSourceRange() const override LLVM_READONLY
Source range that this declaration covers.
SourceLocation getBeginLoc() const LLVM_READONLY
A container of type source information.
The base class of the type hierarchy.
const T * castAs() const
Member-template castAs<specific type>.
const T * getAs() const
Member-template getAs<specific type>'.
Represents the declaration of a typedef-name via the 'typedef' type specifier.
static bool classofKind(Kind K)
SourceRange getSourceRange() const override LLVM_READONLY
Source range that this declaration covers.
static TypedefDecl * CreateDeserialized(ASTContext &C, GlobalDeclID ID)
static bool classof(const Decl *D)
Base class for declarations which introduce a typedef-name.
TypedefNameDecl * getNextRedeclarationImpl() override
Returns the next redeclaration or itself if this is the only decl.
TypeSourceInfo * getTypeSourceInfo() const
TypedefNameDecl * getPreviousDeclImpl() override
Implementation of getPreviousDecl(), to be overridden by any subclass that has a redeclaration chain.
void setModedTypeSourceInfo(TypeSourceInfo *unmodedTSI, QualType modedTy)
redeclarable_base::redecl_range redecl_range
const Type * getTypeForDecl() const =delete
void setTypeForDecl(const Type *TD)=delete
static bool classof(const Decl *D)
const TypedefNameDecl * getCanonicalDecl() const
TypedefNameDecl * getMostRecentDeclImpl() override
Implementation of getMostRecentDecl(), to be overridden by any subclass that has a redeclaration chai...
TypedefNameDecl(Kind DK, ASTContext &C, DeclContext *DC, SourceLocation StartLoc, SourceLocation IdLoc, const IdentifierInfo *Id, TypeSourceInfo *TInfo)
QualType getUnderlyingType() const
bool isTransparentTag() const
Determines if this typedef shares a name and spelling location with its underlying tag type,...
redeclarable_base::redecl_iterator redecl_iterator
TypedefNameDecl * getCanonicalDecl() override
Retrieves the canonical declaration of this typedef-name.
void setTypeSourceInfo(TypeSourceInfo *newType)
static bool classofKind(Kind K)
TagDecl * getAnonDeclWithTypedefName(bool AnyRedecl=false) const
Retrieves the tag declaration for which this is the typedef name for linkage purposes,...
A set of unresolved declarations.
Represent the declaration of a variable (in which case it is an lvalue) a function (in which case it ...
static bool classof(const Decl *D)
ValueDecl(Kind DK, DeclContext *DC, SourceLocation L, DeclarationName N, QualType T)
void setType(QualType newType)
bool isParameterPack() const
Determine whether this value is actually a function parameter pack, init-capture pack,...
bool isWeak() const
Determine whether this symbol is weakly-imported, or declared with the weak or weak-ref attr.
static bool classofKind(Kind K)
VarDecl * getPotentiallyDecomposedVarDecl()
bool isInitCapture() const
Whether this variable is the implicit variable for a lambda init-capture.
const VarDecl * getPotentiallyDecomposedVarDecl() const
Represents a variable declaration or definition.
@ NumScopeDepthOrObjCQualsBits
const VarDecl * getDefinition() const
VarTemplateDecl * getDescribedVarTemplate() const
Retrieves the variable template that is described by this variable declaration.
void setObjCForDecl(bool FRD)
Stmt ** getInitAddress()
Retrieve the address of the initializer expression.
const VarDecl * getInitializingDeclaration() const
void setCXXForRangeDecl(bool FRD)
DefinitionKind isThisDeclarationADefinition() const
bool isFunctionOrMethodVarDecl() const
Similar to isLocalVarDecl, but excludes variables declared in blocks.
bool isConstexpr() const
Whether this variable is (C++11) constexpr.
void setInstantiationOfStaticDataMember(VarDecl *VD, TemplateSpecializationKind TSK)
Specify that this variable is an instantiation of the static data member VD.
TLSKind getTLSKind() const
bool hasICEInitializer(const ASTContext &Context) const
Determine whether the initializer of this variable is an integer constant expression.
redeclarable_base::redecl_range redecl_range
ParmVarDeclBitfields ParmVarDeclBits
void setARCPseudoStrong(bool PS)
VarDecl * getNextRedeclarationImpl() override
Returns the next redeclaration or itself if this is the only decl.
void setInitStyle(InitializationStyle Style)
redeclarable_base::redecl_iterator redecl_iterator
void setCXXForRangeImplicitVar(bool FRV)
InitializationStyle getInitStyle() const
The style of initialization for this declaration.
void setInitCapture(bool IC)
DefinitionKind hasDefinition() const
static const char * getStorageClassSpecifierString(StorageClass SC)
Return the string used to specify the storage class SC.
SourceRange getSourceRange() const override LLVM_READONLY
Source range that this declaration covers.
bool isOutOfLine() const override
Determine whether this is or was instantiated from an out-of-line definition of a static data member.
VarDecl * getCanonicalDecl() override
Retrieves the "canonical" declaration of the given declaration.
bool hasFlexibleArrayInit(const ASTContext &Ctx) const
Whether this variable has a flexible array member initialized with one or more elements.
bool isNoDestroy(const ASTContext &) const
Is destruction of this variable entirely suppressed? If so, the variable need not have a usable destr...
bool isInitCapture() const
Whether this variable is the implicit variable for a lambda init-capture.
bool isCXXCondDecl() const
InitializationStyle
Initialization styles.
@ ListInit
Direct list-initialization (C++11)
@ CInit
C-style initialization with assignment.
@ ParenListInit
Parenthesized list-initialization (C++20)
@ CallInit
Call-style initialization (C++98)
bool isObjCForDecl() const
Determine whether this variable is a for-loop declaration for a for-in statement in Objective-C.
void setStorageClass(StorageClass SC)
void setPreviousDeclInSameBlockScope(bool Same)
bool hasInitWithSideEffects() const
Checks whether this declaration has an initializer with side effects.
bool isInlineSpecified() const
APValue * evaluateValue() const
Attempt to evaluate the value of the initializer attached to this declaration, and produce notes expl...
bool isStaticDataMember() const
Determines whether this is a static data member.
static VarDecl * CreateDeserialized(ASTContext &C, GlobalDeclID ID)
VarDecl * getTemplateInstantiationPattern() const
Retrieve the variable declaration from which this variable could be instantiated, if it is an instant...
bool hasGlobalStorage() const
Returns true for all variables that do not have local storage.
VarDeclBitfields VarDeclBits
CharUnits getFlexibleArrayInitChars(const ASTContext &Ctx) const
If hasFlexibleArrayInit is true, compute the number of additional bytes necessary to store those elem...
bool hasConstantInitialization() const
Determine whether this variable has constant initialization.
bool isCXXForRangeDecl() const
Determine whether this variable is the for-range-declaration in a C++0x for-range statement.
LanguageLinkage getLanguageLinkage() const
Compute the language linkage.
static bool classofKind(Kind K)
const VarDecl * getDefinition(ASTContext &C) const
EvaluatedStmt * getEvaluatedStmt() const
bool mightBeUsableInConstantExpressions(const ASTContext &C) const
Determine whether this variable's value might be usable in a constant expression, according to the re...
EvaluatedStmt * ensureEvaluatedStmt() const
Convert the initializer for this declaration to the elaborated EvaluatedStmt form,...
bool evaluateDestruction(SmallVectorImpl< PartialDiagnosticAt > &Notes) const
Evaluate the destruction of this variable to determine if it constitutes constant destruction.
static bool classof(const Decl *D)
bool isNRVOVariable() const
Determine whether this local variable can be used with the named return value optimization (NRVO).
void setInlineSpecified()
bool isStaticLocal() const
Returns true if a variable with function scope is a static local variable.
const VarDecl * getCanonicalDecl() const
VarDecl * getInstantiatedFromStaticDataMember() const
If this variable is an instantiated static data member of a class template specialization,...
bool isFileVarDecl() const
Returns true for file scoped variable declaration.
bool isCXXForRangeImplicitVar() const
Whether this variable is the implicit '__range' variable in C++ range-based for loops.
bool isExceptionVariable() const
Determine whether this variable is the exception variable in a C++ catch statememt or an Objective-C ...
void setTemplateSpecializationKind(TemplateSpecializationKind TSK, SourceLocation PointOfInstantiation=SourceLocation())
For a static data member that was instantiated from a static data member of a class template,...
void setTSCSpec(ThreadStorageClassSpecifier TSC)
void setNRVOVariable(bool NRVO)
QualType::DestructionKind needsDestruction(const ASTContext &Ctx) const
Would the destruction of this variable have any effect, and if so, what kind?
bool checkForConstantInitialization(SmallVectorImpl< PartialDiagnosticAt > &Notes) const
Evaluate the initializer of this variable to determine whether it's a constant initializer.
bool isInline() const
Whether this variable is (C++1z) inline.
ThreadStorageClassSpecifier getTSCSpec() const
const Expr * getInit() const
bool isNonEscapingByref() const
Indicates the capture is a __block variable that is never captured by an escaping block.
bool isInExternCContext() const
Determines whether this variable's context is, or is nested within, a C++ extern "C" linkage spec.
NonParmVarDeclBitfields NonParmVarDeclBits
bool hasExternalStorage() const
Returns true if a variable has extern or private_extern storage.
InitType Init
The initializer for this variable or, for a ParmVarDecl, the C++ default argument.
APValue * getEvaluatedValue() const
Return the already-evaluated value of this variable's initializer, or NULL if the value is not yet kn...
bool isARCPseudoStrong() const
Determine whether this variable is an ARC pseudo-__strong variable.
bool hasLocalStorage() const
Returns true if a variable with function scope is a non-static local variable.
VarDecl * getInitializingDeclaration()
Get the initializing declaration of this variable, if any.
void setConstexpr(bool IC)
TLSKind
Kinds of thread-local storage.
@ TLS_Static
TLS with a known-constant initializer.
@ TLS_Dynamic
TLS with a dynamic initializer.
@ TLS_None
Not a TLS variable.
VarDecl * getActingDefinition()
Get the tentative definition that acts as the real definition in a TU.
@ TentativeDefinition
This declaration is a tentative definition.
@ DeclarationOnly
This declaration is only a declaration.
@ Definition
This declaration is definitely a definition.
void setDescribedVarTemplate(VarTemplateDecl *Template)
bool isExternC() const
Determines whether this variable is a variable with external, C linkage.
llvm::PointerUnion< Stmt *, EvaluatedStmt * > InitType
bool isLocalVarDecl() const
Returns true for local variable declarations other than parameters.
bool isDirectInit() const
Whether the initializer is a direct-initializer (list or call).
VarDecl * getMostRecentDeclImpl() override
Implementation of getMostRecentDecl(), to be overridden by any subclass that has a redeclaration chai...
StorageDuration getStorageDuration() const
Get the storage duration of this variable, per C++ [basic.stc].
StorageClass getStorageClass() const
Returns the storage class as written in the source.
bool isEscapingByref() const
Indicates the capture is a __block variable that is captured by a block that can potentially escape (...
void setImplicitlyInline()
bool isThisDeclarationADemotedDefinition() const
If this definition should pretend to be a declaration.
bool isPreviousDeclInSameBlockScope() const
Whether this local extern variable declaration's previous declaration was declared in the same block ...
bool isUsableInConstantExpressions(const ASTContext &C) const
Determine whether this variable's value can be used in a constant expression, according to the releva...
bool isInExternCXXContext() const
Determines whether this variable's context is, or is nested within, a C++ extern "C++" linkage spec.
SourceLocation getPointOfInstantiation() const
If this variable is an instantiation of a variable template or a static data member of a class templa...
bool hasDependentAlignment() const
Determines if this variable's alignment is dependent.
TemplateSpecializationKind getTemplateSpecializationKindForInstantiation() const
Get the template specialization kind of this variable for the purposes of template instantiation.
VarDecl * getDefinition()
bool isLocalVarDeclOrParm() const
Similar to isLocalVarDecl but also includes parameters.
TemplateSpecializationKind getTemplateSpecializationKind() const
If this variable is an instantiation of a variable template or a static data member of a class templa...
const VarDecl * getActingDefinition() const
const Expr * getAnyInitializer() const
Get the initializer for this variable, no matter which declaration it is attached to.
void setExceptionVariable(bool EV)
bool isKnownToBeDefined() const
VarDecl * getPreviousDeclImpl() override
Implementation of getPreviousDecl(), to be overridden by any subclass that has a redeclaration chain.
void demoteThisDefinitionToDeclaration()
This is a definition which should be demoted to a declaration.
MemberSpecializationInfo * getMemberSpecializationInfo() const
If this variable is an instantiation of a static data member of a class template specialization,...
Declaration of a variable template.
Represents a C array with a specified size that is not an integer-constant-expression.
Defines the Linkage enumeration and various utility functions.
The JSON file list parser is used to communicate input to InstallAPI.
OverloadedOperatorKind
Enumeration specifying the different kinds of C++ overloaded operators.
@ OO_None
Not an overloaded operator.
ConstexprSpecKind
Define the kind of constexpr specifier.
InClassInitStyle
In-class initialization styles for non-static data members.
@ ICIS_CopyInit
Copy initialization.
@ ICIS_ListInit
Direct list-initialization.
@ ICIS_NoInit
No in-class initializer.
LazyOffsetPtr< Stmt, uint64_t, &ExternalASTSource::GetExternalDeclStmt > LazyDeclStmtPtr
A lazy pointer to a statement.
bool IsEnumDeclComplete(EnumDecl *ED)
Check if the given decl is complete.
@ Create
'create' clause, allowed on Compute and Combined constructs, plus 'data', 'enter data',...
LanguageLinkage
Describes the different kinds of language linkage (C++ [dcl.link]) that an entity may have.
StorageClass
Storage classes.
ThreadStorageClassSpecifier
Thread storage-class-specifier.
@ TSCS_thread_local
C++11 thread_local.
static constexpr StringRef getOpenMPVariantManglingSeparatorStr()
OpenMP variants are mangled early based on their OpenMP context selector.
const StreamingDiagnostic & operator<<(const StreamingDiagnostic &DB, const ASTContext::SectionInfo &Section)
Insertion operator for diagnostics.
Linkage
Describes the different kinds of linkage (C++ [basic.link], C99 6.2.2) that an entity may have.
@ Module
Module linkage, which indicates that the entity can be referred to from other translation units withi...
@ Asm
Assembly: we accept this only so that we can preprocess it.
StorageDuration
The storage duration for an object (per C++ [basic.stc]).
@ SD_Thread
Thread storage duration.
@ SD_Static
Static storage duration.
@ SD_Automatic
Automatic storage duration (most local variables).
@ Template
We are parsing a template declaration.
bool hasArmZT0State(const FunctionDecl *FD)
Returns whether the given FunctionDecl has Arm ZT0 state.
TagTypeKind
The kind of a tag type.
@ Interface
The "__interface" keyword.
@ Struct
The "struct" keyword.
@ Class
The "class" keyword.
@ Union
The "union" keyword.
@ Enum
The "enum" keyword.
bool IsEnumDeclScoped(EnumDecl *ED)
Check if the given decl is scoped.
RecordArgPassingKind
Enum that represents the different ways arguments are passed to and returned from function calls.
@ CanPassInRegs
The argument of this type can be passed directly in registers.
@ CanNeverPassInRegs
The argument of this type cannot be passed directly in registers.
@ CannotPassInRegs
The argument of this type cannot be passed directly in registers.
const FunctionProtoType * T
bool isExternalFormalLinkage(Linkage L)
TemplateSpecializationKind
Describes the kind of template specialization that a particular template specialization declaration r...
@ TSK_ImplicitInstantiation
This template specialization was implicitly instantiated from a template.
@ None
The alignment was not explicit in code.
@ Enum
The "enum" keyword introduces the elaborated-type-specifier.
bool IsArmStreamingFunction(const FunctionDecl *FD, bool IncludeLocallyStreaming)
Returns whether the given FunctionDecl has an __arm[_locally]_streaming attribute.
bool isExternallyVisible(Linkage L)
ImplicitParamKind
Defines the kind of the implicit parameter: is this an implicit parameter with pointer to 'this',...
@ CXXThis
Parameter for C++ 'this' argument.
@ ThreadPrivateVar
Parameter for Thread private variable.
@ Other
Other implicit parameter.
@ CXXVTT
Parameter for C++ virtual table pointers.
@ ObjCSelf
Parameter for Objective-C 'self' argument.
@ ObjCCmd
Parameter for Objective-C '_cmd' argument.
@ CapturedContext
Parameter for captured context.
ExceptionSpecificationType
The various types of exception specifications that exist in C++11.
@ EST_None
no exception specification
Visibility
Describes the different kinds of visibility that a declaration may have.
bool hasArmZAState(const FunctionDecl *FD)
Returns whether the given FunctionDecl has Arm ZA state.
Diagnostic wrappers for TextAPI types for error reporting.
Represents an explicit template argument list in C++, e.g., the "<int>" in "sort<int>".
AssociatedConstraint(const Expr *ConstraintExpr, UnsignedOrNone ArgPackSubstIndex=std::nullopt)
const Expr * ConstraintExpr
UnsignedOrNone ArgPackSubstIndex
constexpr AssociatedConstraint()=default
A placeholder type used to construct an empty shell of a decl-derived type that will be filled in lat...
DeclarationNameInfo - A collector data type for bundling together a DeclarationName and the correspon...
Structure used to store a statement, the constant value to which it was evaluated (if any),...
bool HasConstantDestruction
Whether this variable is known to have constant destruction.
bool WasEvaluated
Whether this statement was already evaluated.
bool CheckedForSideEffects
bool IsEvaluating
Whether this statement is being evaluated.
bool HasConstantInitialization
Whether this variable is known to have constant initialization.
bool HasICEInit
In C++98, whether the initializer is an ICE.
static StringRef getTagTypeKindName(TagTypeKind Kind)
Describes how types, statements, expressions, and declarations should be printed.
A struct with extended info about a syntactic name qualifier, to be used for the case of out-of-line ...
QualifierInfo & operator=(const QualifierInfo &)=delete
TemplateParameterList ** TemplParamLists
A new-allocated array of size NumTemplParamLists, containing pointers to the "outer" template paramet...
NestedNameSpecifierLoc QualifierLoc
QualifierInfo(const QualifierInfo &)=delete
unsigned NumTemplParamLists
The number of "outer" template parameter lists.
void setTemplateParameterListsInfo(ASTContext &Context, ArrayRef< TemplateParameterList * > TPLists)
Sets info about "outer" template parameter lists.