13#ifndef LLVM_CLANG_AST_DECLBASE_H
14#define LLVM_CLANG_AST_DECLBASE_H
26#include "llvm/ADT/ArrayRef.h"
27#include "llvm/ADT/PointerIntPair.h"
28#include "llvm/ADT/PointerUnion.h"
29#include "llvm/ADT/iterator.h"
30#include "llvm/ADT/iterator_range.h"
31#include "llvm/Support/Casting.h"
32#include "llvm/Support/Compiler.h"
33#include "llvm/Support/PrettyStackTrace.h"
34#include "llvm/Support/VersionTuple.h"
50class ExternalSourceSymbolAttr;
54enum class Linkage :
unsigned char;
90#define DECL(DERIVED, BASE) DERIVED,
91#define ABSTRACT_DECL(DECL)
92#define DECL_RANGE(BASE, START, END) \
93 first##BASE = START, last##BASE = END,
94#define LAST_DECL_RANGE(BASE, START, END) \
95 first##BASE = START, last##BASE = END
96#include "clang/AST/DeclNodes.inc"
280 llvm::PointerUnion<DeclContext*, MultipleDC*> DeclCtx;
293 LLVM_PREFERRED_TYPE(
Kind)
294 unsigned DeclKind : 7;
297 LLVM_PREFERRED_TYPE(
bool)
298 unsigned InvalidDecl : 1;
301 LLVM_PREFERRED_TYPE(
bool)
302 unsigned HasAttrs : 1;
306 LLVM_PREFERRED_TYPE(
bool)
307 unsigned Implicit : 1;
311 LLVM_PREFERRED_TYPE(
bool)
318 LLVM_PREFERRED_TYPE(
bool)
319 unsigned Referenced : 1;
324 LLVM_PREFERRED_TYPE(
bool)
325 unsigned TopLevelDeclInObjCContainer : 1;
328 static bool StatisticsEnabled;
347 LLVM_PREFERRED_TYPE(
bool)
375 bool AccessDeclContextCheck() const;
382 auto MOK = D->getModuleOwnershipKind();
384 (!D->isFromASTFile() || D->hasLocalOwningModuleStorage()))
402 DeclCtx(DC), Loc(L), DeclKind(DK), InvalidDecl(
false), HasAttrs(
false),
407 if (StatisticsEnabled)
add(DK);
416 if (StatisticsEnabled)
add(DK);
458 return getSemanticDC();
459 return getMultipleDC()->SemanticDC;
502 bool IgnoreTemplateOrMacroSubstitution);
512 assert(AccessDeclContextCheck());
516 assert(AccessDeclContextCheck());
533 return const_cast<AttrVec&
>(
const_cast<const Decl*
>(
this)->getAttrs());
555 if (!HasAttrs)
return;
558 llvm::erase_if(Vec, [](
Attr *A) {
return isa<Ts...>(A); });
566 template <
typename T>
571 template <
typename T>
576 template <
typename T>
610 bool isUsed(
bool CheckUsedAttr =
true)
const;
643 return TopLevelDeclInObjCContainer;
647 TopLevelDeclInObjCContainer =
V;
758 VersionTuple EnclosingVersion = VersionTuple(),
759 StringRef *RealizedPlatform =
nullptr)
const;
816 Module *getOwningModuleSlow()
const;
828 return getOwningModuleSlow();
838 "owned local decl but no local module storage");
839 return reinterpret_cast<Module *
const *
>(
this)[-1];
844 "should not have a cached owning module");
845 reinterpret_cast<Module **
>(
this)[-1] = M;
902 "no storage available for owning module for this declaration");
937 return getSemanticDC();
938 return getMultipleDC()->LexicalDC;
990 const_cast<const Decl *
>(
this)->getParentFunctionOrMethod(
1022 Decl *Current =
nullptr;
1039 assert(Current &&
"Advancing while iterator has reached end");
1041 Decl *
Next = Current->getNextRedeclarationImpl();
1042 assert(
Next &&
"Should return next redeclaration or itself, never null!");
1043 Current = (
Next != Starter) ?
Next :
nullptr;
1054 return x.Current == y.Current;
1058 return x.Current != y.Current;
1117 static void add(Kind k);
1137 return (DeclKind >= Decl::firstFunction &&
1138 DeclKind <= Decl::lastFunction) ||
1159 return const_cast<Decl *
>(
this)->getAsFunction();
1176 "namespace is not ordinary");
1202 "namespace includes neither ordinary nor tag");
1206 "namespace includes other than ordinary or tag");
1213 if (PerformFriendInjection ||
1221 if (PerformFriendInjection ||
1255 "visible non-member operators should be in ordinary namespace");
1263 void print(raw_ostream &Out,
unsigned Indentation = 0,
1264 bool PrintInstantiation =
false)
const;
1266 unsigned Indentation = 0,
bool PrintInstantiation =
false)
const;
1269 unsigned Indentation = 0);
1277 void dump(raw_ostream &Out,
bool Deserialize =
false,
1281 int64_t
getID()
const;
1318 const Decl *TheDecl;
1321 const char *Message;
1326 : TheDecl(theDecl), Loc(L), SM(sm), Message(Msg) {}
1328 void print(raw_ostream &OS)
const override;
1350 using Decls = llvm::PointerUnion<NamedDecl*, DeclListNode*>;
1367 assert(Ptr &&
"dereferencing end() iterator");
1368 if (DeclListNode *CurNode = dyn_cast<DeclListNode *>(Ptr))
1376 assert(!Ptr.isNull() &&
"Advancing empty iterator");
1378 if (DeclListNode *CurNode = dyn_cast<DeclListNode *>(Ptr))
1379 Ptr = CurNode->Rest;
1385 iterator temp = *
this;
1394 Decls Rest =
nullptr;
1420 bool empty()
const {
return Result.isNull(); }
1429 for (
auto *D : *
this)
1430 if (T *
Decl = dyn_cast<T>(D))
1493 uint64_t DeclKind : 7;
1498 LLVM_PREFERRED_TYPE(
bool)
1499 mutable uint64_t ExternalLexicalStorage : 1;
1504 LLVM_PREFERRED_TYPE(
bool)
1505 mutable uint64_t ExternalVisibleStorage : 1;
1511 LLVM_PREFERRED_TYPE(
bool)
1512 mutable uint64_t NeedToReconcileExternalVisibleStorage : 1;
1516 LLVM_PREFERRED_TYPE(
bool)
1517 mutable uint64_t HasLazyLocalLexicalLookups : 1;
1521 LLVM_PREFERRED_TYPE(
bool)
1522 mutable uint64_t HasLazyExternalLexicalLookups : 1;
1527 LLVM_PREFERRED_TYPE(
bool)
1528 mutable uint64_t UseQualifiedLookup : 1;
1544 LLVM_PREFERRED_TYPE(
bool)
1545 uint64_t IsInline : 1;
1548 LLVM_PREFERRED_TYPE(
bool)
1549 uint64_t IsNested : 1;
1566 uint64_t TagDeclKind : 3;
1571 LLVM_PREFERRED_TYPE(
bool)
1572 uint64_t IsCompleteDefinition : 1;
1575 LLVM_PREFERRED_TYPE(
bool)
1576 uint64_t IsBeingDefined : 1;
1580 LLVM_PREFERRED_TYPE(
bool)
1581 uint64_t IsEmbeddedInDeclarator : 1;
1584 LLVM_PREFERRED_TYPE(
bool)
1585 uint64_t IsFreeStanding : 1;
1589 LLVM_PREFERRED_TYPE(
bool)
1590 uint64_t IsCompleteDefinitionRequired : 1;
1594 LLVM_PREFERRED_TYPE(
bool)
1595 uint64_t IsThisDeclarationADemotedDefinition : 1;
1612 uint64_t NumPositiveBits : 8;
1616 uint64_t NumNegativeBits : 8;
1620 LLVM_PREFERRED_TYPE(
bool)
1621 uint64_t IsScoped : 1;
1627 LLVM_PREFERRED_TYPE(
bool)
1628 uint64_t IsScopedUsingClassTag : 1;
1632 LLVM_PREFERRED_TYPE(
bool)
1633 uint64_t IsFixed : 1;
1636 LLVM_PREFERRED_TYPE(
bool)
1637 uint64_t HasODRHash : 1;
1655 LLVM_PREFERRED_TYPE(
bool)
1656 uint64_t HasFlexibleArrayMember : 1;
1659 LLVM_PREFERRED_TYPE(
bool)
1660 uint64_t AnonymousStructOrUnion : 1;
1664 LLVM_PREFERRED_TYPE(
bool)
1665 uint64_t HasObjectMember : 1;
1669 LLVM_PREFERRED_TYPE(
bool)
1670 uint64_t HasVolatileMember : 1;
1676 LLVM_PREFERRED_TYPE(
bool)
1677 mutable uint64_t LoadedFieldsFromExternalStorage : 1;
1680 LLVM_PREFERRED_TYPE(
bool)
1681 uint64_t NonTrivialToPrimitiveDefaultInitialize : 1;
1682 LLVM_PREFERRED_TYPE(
bool)
1683 uint64_t NonTrivialToPrimitiveCopy : 1;
1684 LLVM_PREFERRED_TYPE(
bool)
1685 uint64_t NonTrivialToPrimitiveDestroy : 1;
1690 LLVM_PREFERRED_TYPE(
bool)
1691 uint64_t HasNonTrivialToPrimitiveDefaultInitializeCUnion : 1;
1692 LLVM_PREFERRED_TYPE(
bool)
1693 uint64_t HasNonTrivialToPrimitiveDestructCUnion : 1;
1694 LLVM_PREFERRED_TYPE(
bool)
1695 uint64_t HasNonTrivialToPrimitiveCopyCUnion : 1;
1702 LLVM_PREFERRED_TYPE(
bool)
1703 uint64_t HasUninitializedExplicitInitFields : 1;
1706 LLVM_PREFERRED_TYPE(
bool)
1707 uint64_t ParamDestroyedInCallee : 1;
1711 uint64_t ArgPassingRestrictions : 2;
1714 LLVM_PREFERRED_TYPE(
bool)
1715 uint64_t IsRandomized : 1;
1737 uint64_t InitializerKind : 2;
1757 uint64_t SClass : 3;
1758 LLVM_PREFERRED_TYPE(
bool)
1759 uint64_t IsInline : 1;
1760 LLVM_PREFERRED_TYPE(
bool)
1761 uint64_t IsInlineSpecified : 1;
1763 LLVM_PREFERRED_TYPE(
bool)
1764 uint64_t IsVirtualAsWritten : 1;
1765 LLVM_PREFERRED_TYPE(
bool)
1766 uint64_t IsPureVirtual : 1;
1767 LLVM_PREFERRED_TYPE(
bool)
1768 uint64_t HasInheritedPrototype : 1;
1769 LLVM_PREFERRED_TYPE(
bool)
1770 uint64_t HasWrittenPrototype : 1;
1771 LLVM_PREFERRED_TYPE(
bool)
1772 uint64_t IsDeleted : 1;
1774 LLVM_PREFERRED_TYPE(
bool)
1775 uint64_t IsTrivial : 1;
1780 LLVM_PREFERRED_TYPE(
bool)
1781 uint64_t IsTrivialForCall : 1;
1783 LLVM_PREFERRED_TYPE(
bool)
1784 uint64_t IsDefaulted : 1;
1785 LLVM_PREFERRED_TYPE(
bool)
1786 uint64_t IsExplicitlyDefaulted : 1;
1787 LLVM_PREFERRED_TYPE(
bool)
1788 uint64_t HasDefaultedOrDeletedInfo : 1;
1793 LLVM_PREFERRED_TYPE(
bool)
1794 uint64_t IsIneligibleOrNotSelected : 1;
1796 LLVM_PREFERRED_TYPE(
bool)
1797 uint64_t HasImplicitReturnZero : 1;
1798 LLVM_PREFERRED_TYPE(
bool)
1799 uint64_t IsLateTemplateParsed : 1;
1800 LLVM_PREFERRED_TYPE(
bool)
1801 uint64_t IsInstantiatedFromMemberTemplate : 1;
1805 uint64_t ConstexprKind : 2;
1806 LLVM_PREFERRED_TYPE(
bool)
1807 uint64_t BodyContainsImmediateEscalatingExpression : 1;
1809 LLVM_PREFERRED_TYPE(
bool)
1810 uint64_t InstantiationIsPending : 1;
1813 LLVM_PREFERRED_TYPE(
bool)
1814 uint64_t UsesSEHTry : 1;
1818 LLVM_PREFERRED_TYPE(
bool)
1819 uint64_t HasSkippedBody : 1;
1823 LLVM_PREFERRED_TYPE(
bool)
1824 uint64_t WillHaveBody : 1;
1828 LLVM_PREFERRED_TYPE(
bool)
1829 uint64_t IsMultiVersion : 1;
1835 uint64_t DeductionCandidateKind : 2;
1838 LLVM_PREFERRED_TYPE(
bool)
1839 uint64_t HasODRHash : 1;
1842 LLVM_PREFERRED_TYPE(
bool)
1843 uint64_t UsesFPIntrin : 1;
1847 LLVM_PREFERRED_TYPE(
bool)
1848 uint64_t FriendConstraintRefersToEnclosingTemplate : 1;
1868 uint64_t NumCtorInitializers : 16;
1869 LLVM_PREFERRED_TYPE(
bool)
1870 uint64_t IsInheritingConstructor : 1;
1873 LLVM_PREFERRED_TYPE(
bool)
1874 uint64_t HasTrailingExplicitSpecifier : 1;
1877 LLVM_PREFERRED_TYPE(
bool)
1878 uint64_t IsSimpleExplicit : 1;
1901 LLVM_PREFERRED_TYPE(
bool)
1902 uint64_t IsInstance : 1;
1903 LLVM_PREFERRED_TYPE(
bool)
1904 uint64_t IsVariadic : 1;
1907 LLVM_PREFERRED_TYPE(
bool)
1908 uint64_t IsPropertyAccessor : 1;
1911 LLVM_PREFERRED_TYPE(
bool)
1912 uint64_t IsSynthesizedAccessorStub : 1;
1915 LLVM_PREFERRED_TYPE(
bool)
1916 uint64_t IsDefined : 1;
1919 LLVM_PREFERRED_TYPE(
bool)
1920 uint64_t IsRedeclaration : 1;
1923 LLVM_PREFERRED_TYPE(
bool)
1924 mutable uint64_t HasRedeclaration : 1;
1928 uint64_t DeclImplementation : 2;
1932 uint64_t objcDeclQualifier : 7;
1935 LLVM_PREFERRED_TYPE(
bool)
1936 uint64_t RelatedResultType : 1;
1941 uint64_t SelLocsKind : 2;
1950 LLVM_PREFERRED_TYPE(
bool)
1951 uint64_t IsOverriding : 1;
1954 LLVM_PREFERRED_TYPE(
bool)
1955 uint64_t HasSkippedBody : 1;
1991 uint64_t Language : 3;
1997 LLVM_PREFERRED_TYPE(
bool)
1998 uint64_t HasBraces : 1;
2013 LLVM_PREFERRED_TYPE(
bool)
2014 uint64_t IsVariadic : 1;
2015 LLVM_PREFERRED_TYPE(
bool)
2016 uint64_t CapturesCXXThis : 1;
2017 LLVM_PREFERRED_TYPE(
bool)
2018 uint64_t BlockMissingReturnType : 1;
2019 LLVM_PREFERRED_TYPE(
bool)
2020 uint64_t IsConversionFromLambda : 1;
2024 LLVM_PREFERRED_TYPE(
bool)
2025 uint64_t DoesNotEscape : 1;
2030 LLVM_PREFERRED_TYPE(
bool)
2031 uint64_t CanAvoidCopyToHeap : 1;
2069 "DeclContextBitfields is larger than 8 bytes!");
2071 "NamespaceDeclBitfields is larger than 8 bytes!");
2073 "TagDeclBitfields is larger than 8 bytes!");
2075 "EnumDeclBitfields is larger than 8 bytes!");
2077 "RecordDeclBitfields is larger than 8 bytes!");
2079 "OMPDeclareReductionDeclBitfields is larger than 8 bytes!");
2081 "FunctionDeclBitfields is larger than 8 bytes!");
2083 "CXXConstructorDeclBitfields is larger than 8 bytes!");
2085 "ObjCMethodDeclBitfields is larger than 8 bytes!");
2087 "ObjCContainerDeclBitfields is larger than 8 bytes!");
2089 "LinkageSpecDeclBitfields is larger than 8 bytes!");
2091 "BlockDeclBitfields is larger than 8 bytes!");
2107 static std::pair<Decl *, Decl *>
2143 return cast<Decl>(
this)->getLexicalDeclContext();
2167 case Decl::ObjCCategory:
2168 case Decl::ObjCCategoryImpl:
2169 case Decl::ObjCImplementation:
2170 case Decl::ObjCInterface:
2171 case Decl::ObjCProtocol:
2181 case Decl::Captured:
2182 case Decl::ObjCMethod:
2183 case Decl::TopLevelStmt:
2349 Decl *Current =
nullptr;
2378 return x.Current == y.Current;
2382 return x.Current != y.Current;
2409 template<
typename SpecificDecl>
2419 void SkipToNextDecl() {
2431 std::iterator_traits<DeclContext::decl_iterator>::difference_type;
2467 return x.Current == y.Current;
2472 return x.Current != y.Current;
2485 template<
typename SpecificDecl,
bool (SpecificDecl::*Acceptable)() const>
2495 void SkipToNextDecl() {
2509 std::iterator_traits<DeclContext::decl_iterator>::difference_type;
2543 return x.Current == y.Current;
2548 return x.Current != y.Current;
2678 using ddiag_range = llvm::iterator_range<DeclContext::ddiag_iterator>;
2692 "should only be called on primary context");
2752 bool Deserialize =
false)
const;
2762 bool hasNeedToReconcileExternalVisibleStorage()
const {
2770 void setNeedToReconcileExternalVisibleStorage(
bool Need =
true)
const {
2776 bool hasLazyLocalLexicalLookups()
const {
2782 void setHasLazyLocalLexicalLookups(
bool HasLLLL =
true)
const {
2788 bool hasLazyExternalLexicalLookups()
const {
2794 void setHasLazyExternalLexicalLookups(
bool HasLELL =
true)
const {
2798 void reconcileExternalVisibleStorage()
const;
2799 bool LoadLexicalDeclsFromExternalStorage()
const;
2801 StoredDeclsMap *CreateStoredDeclsMap(ASTContext &
C)
const;
2803 void loadLazyLocalLexicalLookups();
2805 void makeDeclVisibleInContextWithFlags(NamedDecl *D,
bool Internal,
2806 bool Rediscoverable);
2807 void makeDeclVisibleInContextImpl(NamedDecl *D,
bool Internal);
2811 return getKind() == TemplateTypeParm ||
getKind() == NonTypeTemplateParm ||
2812 getKind() == TemplateTemplateParm;
2816template <
class ToTy,
2817 bool IsKnownSubtype = ::std::is_base_of<DeclContext, ToTy>::value>
2829template <
class ToTy>
2832 return static_cast<const ToTy*
>(Val);
2836 return static_cast<ToTy*
>(Val);
2845template <
typename To>
2847 static bool doit(const ::clang::DeclContext &Val) {
2848 return To::classofKind(Val.getDeclKind());
2854struct cast_convert_val<ToTy,
2856 static const ToTy &
doit(const ::clang::DeclContext &Val) {
2869struct cast_convert_val<ToTy,
2871 static const ToTy *
doit(const ::clang::DeclContext *Val) {
2872 return ::clang::cast_convert_decl_context<ToTy>::doit(Val);
2879 return ::clang::cast_convert_decl_context<ToTy>::doit(Val);
2884template<
class FromTy>
2886 static ::clang::DeclContext &
doit(
const FromTy &Val) {
2887 return *FromTy::castToDeclContext(&Val);
2891template<
class FromTy>
2893 static ::clang::DeclContext *
doit(
const FromTy *Val) {
2894 return FromTy::castToDeclContext(Val);
2898template<
class FromTy>
2900 static const ::clang::DeclContext &
doit(
const FromTy &Val) {
2901 return *FromTy::castToDeclContext(&Val);
2905template<
class FromTy>
2907 static const ::clang::DeclContext *
doit(
const FromTy *Val) {
2908 return FromTy::castToDeclContext(Val);
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 the clang::LangOptions interface.
Defines the clang::SourceLocation class and associated facilities.
Defines various enumerations that describe declaration and type specifiers.
__PTRDIFF_TYPE__ ptrdiff_t
A signed integer type that is the result of subtracting two pointers.
Holds long-lived AST nodes (such as types and decls) that can be referred to throughout the semantic ...
An abstract interface that should be implemented by listeners that want to be notified when an AST en...
Attr - This represents one attribute.
Represents a block literal declaration, which is like an unnamed FunctionDecl.
The results of name lookup within a DeclContext.
DeclContextLookupResult(Decls Result)
iterator::reference reference
DeclContextLookupResult()=default
const_iterator begin() const
DeclListNode::iterator iterator
const_iterator end() const
bool isSingleResult() const
Stores the bits used by BlockDecl.
Stores the bits used by CXXConstructorDecl.
friend class CXXConstructorDecl
Stores the bits used by DeclContext.
Stores the bits used by EnumDecl.
Stores the bits used by FunctionDecl.
friend class FunctionDecl
friend class CXXDeductionGuideDecl
For DeductionCandidateKind.
Stores the bits used by LinkageSpecDecl.
friend class LinkageSpecDecl
Stores the bits used by NamespaceDecl.
friend class NamespaceDecl
Stores the bits used by OMPDeclareReductionDecl.
friend class OMPDeclareReductionDecl
Stores the bits used by ObjCContainerDecl.
friend class ObjCContainerDecl
Stores the bits used by ObjCMethodDecl.
friend class ObjCMethodDecl
Stores the bits used by RecordDecl.
Stores the bits used by TagDecl.
all_lookups_iterator - An iterator that provides a view over the results of looking up every possible...
An iterator over the dependent diagnostics in a dependent context.
decl_iterator - Iterates through the declarations stored within this context.
std::ptrdiff_t difference_type
std::forward_iterator_tag iterator_category
decl_iterator operator++(int)
value_type operator->() const
const value_type * pointer
friend bool operator!=(decl_iterator x, decl_iterator y)
friend bool operator==(decl_iterator x, decl_iterator y)
const value_type & reference
reference operator*() const
decl_iterator & operator++()
std::forward_iterator_tag iterator_category
value_type operator->() const
filtered_decl_iterator(DeclContext::decl_iterator C)
filtered_decl_iterator - Construct a new iterator over a subset of the declarations the range [C,...
friend bool operator==(const filtered_decl_iterator &x, const filtered_decl_iterator &y)
value_type operator*() const
std::iterator_traits< DeclContext::decl_iterator >::difference_type difference_type
filtered_decl_iterator operator++(int)
friend bool operator!=(const filtered_decl_iterator &x, const filtered_decl_iterator &y)
SpecificDecl * value_type
filtered_decl_iterator()=default
filtered_decl_iterator & operator++()
specific_decl_iterator()=default
specific_decl_iterator(DeclContext::decl_iterator C)
specific_decl_iterator - Construct a new iterator over a subset of the declarations the range [C,...
value_type operator->() const
friend bool operator==(const specific_decl_iterator &x, const specific_decl_iterator &y)
std::iterator_traits< DeclContext::decl_iterator >::difference_type difference_type
std::forward_iterator_tag iterator_category
value_type operator*() const
SpecificDecl * value_type
specific_decl_iterator operator++(int)
friend bool operator!=(const specific_decl_iterator &x, const specific_decl_iterator &y)
specific_decl_iterator & operator++()
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.
udir_range using_directives() const
Returns iterator range [First, Last) of UsingDirectiveDecls stored within this context.
bool Equals(const DeclContext *DC) const
Determine whether this declaration context is equivalent to the declaration context DC.
lookup_result::iterator lookup_iterator
bool isRequiresExprBody() const
friend class ASTWriter
For hasNeedToReconcileExternalVisibleStorage, hasLazyLocalLexicalLookups, hasLazyExternalLexicalLooku...
FunctionDeclBitfields FunctionDeclBits
bool isFileContext() const
void setHasExternalVisibleStorage(bool ES=true) const
State whether this DeclContext has external storage for declarations visible in this context.
void makeDeclVisibleInContext(NamedDecl *D)
Makes a declaration visible within this context.
all_lookups_iterator noload_lookups_begin() const
Iterators over all possible lookups within this context that are currently loaded; don't attempt to r...
DeclContextLookupResult lookup_result
void dumpLookups(llvm::raw_ostream &OS, bool DumpDecls=false, bool Deserialize=false) const
static std::pair< Decl *, Decl * > BuildDeclChain(ArrayRef< Decl * > Decls, bool FieldsAlreadyLoaded)
Build up a chain of declarations.
bool isTransparentContext() const
isTransparentContext - Determines whether this context is a "transparent" context,...
@ NumOMPDeclareReductionDeclBits
Decl * getNonClosureAncestor()
Find the nearest non-closure ancestor of this context, i.e.
bool isObjCContainer() const
ObjCMethodDeclBitfields ObjCMethodDeclBits
TagDeclBitfields TagDeclBits
ASTContext & getParentASTContext() const
lookups_range noload_lookups(bool PreserveInternalState) const
const DeclContext * getParent() const
bool isExternCXXContext() const
Determines whether this context or some of its ancestors is a linkage specification context that spec...
bool isDependentContext() const
Determines whether this context is dependent on a template parameter.
bool InEnclosingNamespaceSetOf(const DeclContext *NS) const
Test if this context is part of the enclosing namespace set of the context NS, as defined in C++0x [n...
const DeclContext * getRedeclContext() const
EnumDeclBitfields EnumDeclBits
CXXConstructorDeclBitfields CXXConstructorDeclBits
static bool classof(const DeclContext *D)
const Decl * getNonClosureAncestor() const
DeclContext * getLexicalParent()
getLexicalParent - Returns the containing lexical DeclContext.
lookup_result lookup(DeclarationName Name) const
lookup - Find the declarations (if any) with the given Name in this context.
bool isLookupContext() const
Test whether the context supports looking up names.
const BlockDecl * getInnermostBlockDecl() const
Return this DeclContext if it is a BlockDecl.
bool hasExternalVisibleStorage() const
Whether this DeclContext has external storage containing additional declarations that are visible in ...
const DeclContext * getPrimaryContext() const
ObjCContainerDeclBitfields ObjCContainerDeclBits
const char * getDeclKindName() const
BlockDeclBitfields BlockDeclBits
bool isTranslationUnit() const
void collectAllContexts(SmallVectorImpl< DeclContext * > &Contexts)
Collects all of the declaration contexts that are semantically connected to this declaration context.
DeclContext * getRedeclContext()
getRedeclContext - Retrieve the context in which an entity conflicts with other entities of the same ...
llvm::iterator_range< udir_iterator > udir_range
all_lookups_iterator lookups_end() const
void setMustBuildLookupTable()
Mark that there are external lexical declarations that we need to include in our lookup table (and th...
RecordDeclBitfields RecordDeclBits
Decl * FirstDecl
FirstDecl - The first declaration stored within this declaration context.
friend class ASTDeclReader
For makeDeclVisibleInContextImpl.
decl_iterator noload_decls_begin() const
DeclContext(Decl::Kind K)
void addDeclInternal(Decl *D)
Add the declaration D into this context, but suppress searches for external declarations with the sam...
lookups_range lookups() const
const DeclContext * getLookupParent() const
bool shouldUseQualifiedLookup() const
bool containsDeclAndLoad(Decl *D) const
Checks whether a declaration is in this context.
void removeDecl(Decl *D)
Removes a declaration from this context.
void addDecl(Decl *D)
Add the declaration D into this context.
@ NumCXXConstructorDeclBits
llvm::iterator_range< decl_iterator > decl_range
void dumpDeclContext() const
StoredDeclsMap * buildLookup()
Ensure the lookup structure is fully-built and return it.
decl_iterator decls_end() const
bool hasValidDeclKind() const
bool isStdNamespace() const
ddiag_range ddiags() const
lookup_result noload_lookup(DeclarationName Name)
Find the declarations with the given name that are visible within this context; don't attempt to retr...
static bool classof(const Decl *D)
const DeclContext * getNonTransparentContext() const
const RecordDecl * getOuterLexicalRecordContext() const
bool containsDecl(Decl *D) const
Checks whether a declaration is in this context.
llvm::iterator_range< DeclContext::ddiag_iterator > ddiag_range
bool hasExternalLexicalStorage() const
Whether this DeclContext has external storage containing additional declarations that are lexically i...
void setUseQualifiedLookup(bool use=true) const
DeclContext * getEnclosingNamespaceContext()
Retrieve the nearest enclosing namespace context.
friend class ExternalASTSource
For reconcileExternalVisibleStorage, CreateStoredDeclsMap, hasNeedToReconcileExternalVisibleStorage.
Decl * LastDecl
LastDecl - The last declaration stored within this declaration context.
friend class ASTDeclWriter
For checking the new bits in the Serialization part.
NamespaceDeclBitfields NamespaceDeclBits
all_lookups_iterator lookups_begin() const
Iterators over all possible lookups within this context.
llvm::iterator_range< all_lookups_iterator > lookups_range
decl_range noload_decls() const
noload_decls_begin/end - Iterate over the declarations stored in this context that are currently load...
friend class DependentDiagnostic
For CreateStoredDeclsMap.
DeclContext * getPrimaryContext()
getPrimaryContext - There may be many different declarations of the same entity (including forward de...
RecordDecl * getOuterLexicalRecordContext()
Retrieve the outermost lexically enclosing record context.
const DeclContext * getEnclosingNamespaceContext() const
decl_range decls() const
decls_begin/decls_end - Iterate over the declarations stored in this context.
bool isInlineNamespace() const
DeclContextBitfields DeclContextBits
bool isFunctionOrMethod() const
llvm::iterator_adaptor_base< udir_iterator, lookup_iterator, lookup_iterator::iterator_category, UsingDirectiveDecl * > udir_iterator_base
void setHasExternalLexicalStorage(bool ES=true) const
State whether this DeclContext has external storage for declarations lexically in this context.
DeclContext * getLookupParent()
Find the parent context of this context that will be used for unqualified name lookup.
StoredDeclsMap * LookupPtr
Pointer to the data structure used to lookup declarations within this context (or a DependentStoredDe...
bool isExternCContext() const
Determines whether this context or some of its ancestors is a linkage specification context that spec...
all_lookups_iterator noload_lookups_end() const
const LinkageSpecDecl * getExternCContext() const
Retrieve the nearest enclosing C linkage specification context.
LinkageSpecDeclBitfields LinkageSpecDeclBits
decl_iterator noload_decls_end() const
StoredDeclsMap * getLookupPtr() const
Retrieve the internal representation of the lookup structure.
bool Encloses(const DeclContext *DC) const
Determine whether this declaration context semantically encloses the declaration context DC.
void addHiddenDecl(Decl *D)
Add the declaration D to this context without modifying any lookup tables.
void localUncachedLookup(DeclarationName Name, SmallVectorImpl< NamedDecl * > &Results)
A simplistic name lookup mechanism that performs name lookup into this declaration context without co...
OMPDeclareReductionDeclBitfields OMPDeclareReductionDeclBits
bool isDeclInLexicalTraversal(const Decl *D) const
Determine whether the given declaration is stored in the list of declarations lexically within this c...
Decl::Kind getDeclKind() const
DeclContext * getNonTransparentContext()
@ NumObjCContainerDeclBits
decl_iterator decls_begin() const
bool LexicallyEncloses(const DeclContext *DC) const
Determine whether this declaration context lexically encloses the declaration context DC.
const DeclContext * getLexicalParent() const
std::forward_iterator_tag iterator_category
ptrdiff_t difference_type
friend class DeclContextLookupResult
reference operator*() const
bool operator==(const iterator &X) const
friend class StoredDeclsList
bool operator!=(const iterator &X) const
A list storing NamedDecls in the lookup tables.
friend class StoredDeclsList
llvm::PointerUnion< NamedDecl *, DeclListNode * > Decls
Iterates through all the redeclarations of the same decl.
friend bool operator!=(redecl_iterator x, redecl_iterator y)
value_type operator->() const
redecl_iterator & operator++()
redecl_iterator operator++(int)
friend bool operator==(redecl_iterator x, redecl_iterator y)
const value_type * pointer
std::ptrdiff_t difference_type
redecl_iterator()=default
const value_type & reference
reference operator*() const
std::forward_iterator_tag iterator_category
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 ...
const DeclContext * getParentFunctionOrMethod(bool LexicalParent=false) const
If this decl is defined inside a function/method/block it returns the corresponding DeclContext,...
bool isInStdNamespace() const
unsigned CacheValidAndLinkage
If 0, we have not computed the linkage of this declaration.
bool isInCurrentModuleUnit() const
Whether this declaration comes from the same module unit being compiled.
SourceLocation getEndLoc() const LLVM_READONLY
bool isModulePrivate() const
Whether this declaration was marked as being private to the module in which it was defined.
TemplateDecl * getDescribedTemplate() const
If this is a declaration that describes some template, this method returns that template declaration.
bool isTemplateDecl() const
returns true if this declaration is a template
Module * getTopLevelOwningNamedModule() const
Get the top level owning named module that owns this declaration if any.
FriendObjectKind getFriendObjectKind() const
Determines whether this declaration is the object of a friend declaration and, if so,...
bool isFunctionOrFunctionTemplate() const
Whether this declaration is a function or function template.
bool isModuleLocal() const
Whether this declaration was a local declaration to a C++20 named module.
bool isFromGlobalModule() const
Whether this declaration comes from global module.
static bool isFlexibleArrayMemberLike(const ASTContext &Context, const Decl *D, QualType Ty, LangOptions::StrictFlexArraysLevelKind StrictFlexArraysLevel, bool IgnoreTemplateOrMacroSubstitution)
Whether it resembles a flexible array member.
ASTContext & getASTContext() const LLVM_READONLY
void setOwningModuleID(unsigned ID)
Set the owning module ID.
attr_iterator attr_end() const
bool isImplicit() const
isImplicit - Indicates whether the declaration was implicitly generated by the implementation.
void setAttrs(const AttrVec &Attrs)
bool isUnavailable(std::string *Message=nullptr) const
Determine whether this declaration is marked 'unavailable'.
bool hasLocalOwningModuleStorage() const
const Decl * getPreviousDecl() const
Retrieve the previous declaration that declares the same entity as this declaration,...
friend class Redeclarable
bool isFunctionPointerType() const
bool isInNamedModule() const
Whether this declaration comes from a named module.
const TranslationUnitDecl * getTranslationUnitDecl() const
ExternalSourceSymbolAttr * getExternalSourceSymbolAttr() const
Looks on this and related declarations for an applicable external source symbol attribute.
void setFromASTFile()
Set the FromASTFile flag.
void setLocalExternDecl()
Changes the namespace of this declaration to reflect that it's a function-local extern declaration.
Decl(Kind DK, DeclContext *DC, SourceLocation L)
virtual bool isOutOfLine() const
Determine whether this declaration is declared out of line (outside its semantic context).
virtual Decl * getPreviousDeclImpl()
Implementation of getPreviousDecl(), to be overridden by any subclass that has a redeclaration chain.
Decl(Kind DK, EmptyShell Empty)
llvm::iterator_range< redecl_iterator > redecl_range
const Decl * getCanonicalDecl() const
bool isWeakImported() const
Determine whether this is a weak-imported symbol.
ModuleOwnershipKind getModuleOwnershipKind() const
Get the kind of module ownership for this declaration.
bool isParameterPack() const
Whether this declaration is a parameter pack.
ASTMutationListener * getASTMutationListener() const
bool hasCachedLinkage() const
unsigned getMaxAlignment() const
getMaxAlignment - return the maximum alignment specified by attributes on this decl,...
AvailabilityResult getAvailability(std::string *Message=nullptr, VersionTuple EnclosingVersion=VersionTuple(), StringRef *RealizedPlatform=nullptr) const
Determine the availability of the given declaration.
void setInvalidDecl(bool Invalid=true)
setInvalidDecl - Indicates the Decl had a semantic error.
bool isUnconditionallyVisible() const
Determine whether this declaration is definitely visible to name lookup, independent of whether the o...
friend class ASTDeclMerger
DeclContext * getParentFunctionOrMethod(bool LexicalParent=false)
Kind
Lists the kind of concrete classes of Decl.
void clearIdentifierNamespace()
Clears the namespace of this declaration.
AttrVec::const_iterator attr_iterator
static unsigned getIdentifierNamespaceForKind(Kind DK)
void setTopLevelDeclInObjCContainer(bool V=true)
virtual Stmt * getBody() const
getBody - If this Decl represents a declaration for a body of code, such as a function or method defi...
void markUsed(ASTContext &C)
Mark the declaration used, in the sense of odr-use.
bool isInIdentifierNamespace(unsigned NS) const
bool isFileContextDecl() const
static Decl * castFromDeclContext(const DeclContext *)
@ FOK_Undeclared
A friend of a previously-undeclared entity.
@ FOK_None
Not a friend object.
@ FOK_Declared
A friend of a previously-declared entity.
Decl * getNextDeclInContext()
bool isInvisibleOutsideTheOwningModule() const
bool isTemplated() const
Determine whether this declaration is a templated entity (whether it is.
bool isInExportDeclContext() const
Whether this declaration was exported in a lexical context.
SourceLocation getBodyRBrace() const
getBodyRBrace - Gets the right brace of the body, if a body exists.
static bool isTagIdentifierNamespace(unsigned NS)
bool isReferenced() const
Whether any declaration of this entity was referenced.
const FunctionType * getFunctionType(bool BlocksToo=true) const
Looks through the Decl's underlying type to extract a FunctionType when possible.
bool isCanonicalDecl() const
Whether this particular Decl is a canonical one.
bool isInAnotherModuleUnit() const
Whether this declaration comes from another module unit.
llvm::PointerIntPair< Decl *, 3, ModuleOwnershipKind > NextInContextAndBits
The next declaration within the same lexical DeclContext.
Module * getOwningModule() const
Get the module that owns this declaration (for visibility purposes).
unsigned getTemplateDepth() const
Determine the number of levels of template parameter surrounding this declaration.
bool isFirstDecl() const
True if this is the first declaration in its redeclaration chain.
friend class ASTDeclReader
bool isFromExplicitGlobalModule() const
Whether this declaration comes from explicit global module.
FunctionDecl * getAsFunction() LLVM_READONLY
Returns the function itself, or the templated function if this is a function template.
Module * getImportedOwningModule() const
Get the imported owning module, if this decl is from an imported (non-local) module.
friend class ASTNodeImporter
bool canBeWeakImported(bool &IsDefinition) const
Determines whether this symbol can be weak-imported, e.g., whether it would be well-formed to add the...
static DeclContext * castToDeclContext(const Decl *)
const DeclContext * getDeclContext() const
ObjCDeclQualifier
ObjCDeclQualifier - 'Qualifiers' written next to the return and parameter types in method declaration...
@ OBJC_TQ_CSNullability
The nullability qualifier is set when the nullability of the result or parameter was expressed via a ...
const TemplateParameterList * getDescribedTemplateParams() const
If this is a declaration that describes some template or partial specialization, this returns the cor...
void invalidateCachedLinkage()
When doing manipulations which might change the computed linkage, such as changing the DeclContext af...
void setObjectOfFriendDecl(bool PerformFriendInjection=false)
Changes the namespace of this declaration to reflect that it's the object of a friend declaration.
bool isFromASTFile() const
Determine whether this declaration came from an AST file (such as a precompiled header or module) rat...
attr_iterator attr_begin() const
bool isInLocalScopeForInstantiation() const
Determine whether a substitution into this declaration would occur as part of a substitution into a d...
const Attr * getDefiningAttr() const
Return this declaration's defining attribute if it has one.
Linkage getCachedLinkage() const
bool isTemplateParameter() const
isTemplateParameter - Determines whether this declaration is a template parameter.
DeclContext * getNonTransparentDeclContext()
Return the non transparent context.
virtual bool hasBody() const
Returns true if this Decl represents a declaration for a body of code, such as a function or method d...
Decl * getNonClosureContext()
Find the innermost non-closure ancestor of this declaration, walking up through blocks,...
bool isInvalidDecl() const
unsigned getIdentifierNamespace() const
unsigned FromASTFile
Whether this declaration was loaded from an AST file.
const Decl * getMostRecentDecl() const
Retrieve the most recent declaration that declares the same entity as this declaration (which may be ...
virtual Decl * getNextRedeclarationImpl()
Returns the next redeclaration or itself if this is the only decl.
Decl & operator=(Decl &&)=delete
bool hasDefiningAttr() const
Return true if this declaration has an attribute which acts as definition of the entity,...
bool isLocalExternDecl() const
Determine whether this is a block-scope declaration with linkage.
llvm::iterator_range< specific_attr_iterator< T > > specific_attrs() const
friend class CXXClassMemberWrapper
void setAccess(AccessSpecifier AS)
SourceLocation getLocation() const
redecl_iterator redecls_end() const
const char * getDeclKindName() const
IdentifierNamespace
IdentifierNamespace - The different namespaces in which declarations may appear.
@ IDNS_NonMemberOperator
This declaration is a C++ operator declared in a non-class context.
@ IDNS_TagFriend
This declaration is a friend class.
@ IDNS_Ordinary
Ordinary names.
@ IDNS_Type
Types, declared with 'struct foo', typedefs, etc.
@ IDNS_OMPReduction
This declaration is an OpenMP user defined reduction construction.
@ IDNS_Label
Labels, declared with 'x:' and referenced with 'goto x'.
@ IDNS_Member
Members, declared with object declarations within tag definitions.
@ IDNS_OMPMapper
This declaration is an OpenMP user defined mapper.
@ IDNS_ObjCProtocol
Objective C @protocol.
@ IDNS_Namespace
Namespaces, declared with 'namespace foo {}'.
@ IDNS_OrdinaryFriend
This declaration is a friend function.
@ IDNS_Using
This declaration is a using declaration.
@ IDNS_LocalExtern
This declaration is a function-local extern declaration of a variable or function.
@ IDNS_Tag
Tags, declared with 'struct foo;' and referenced with 'struct foo'.
bool isDeprecated(std::string *Message=nullptr) const
Determine whether this declaration is marked 'deprecated'.
AccessSpecifier getAccessUnsafe() const
Retrieve the access specifier for this declaration, even though it may not yet have been properly set...
bool isTemplateParameterPack() const
isTemplateParameter - Determines whether this declaration is a template parameter pack.
void setLocalOwningModule(Module *M)
const DeclContext * getNonTransparentDeclContext() const
void setImplicit(bool I=true)
void setReferenced(bool R=true)
const DeclContext * getLexicalDeclContext() const
static void printGroup(Decl **Begin, unsigned NumDecls, raw_ostream &Out, const PrintingPolicy &Policy, unsigned Indentation=0)
friend class ASTDeclWriter
bool isThisDeclarationReferenced() const
Whether this declaration was referenced.
redecl_range redecls() const
Returns an iterator range for all the redeclarations of the same decl.
void setIsUsed()
Set whether the declaration is used, in the sense of odr-use.
unsigned Access
Access - Used by C++ decls for the access specifier.
void setVisiblePromoted()
bool isTopLevelDeclInObjCContainer() const
Whether this declaration is a top-level declaration (function, global variable, etc....
void setLocation(SourceLocation L)
friend class LinkageComputer
bool isUsed(bool CheckUsedAttr=true) const
Whether any (re-)declaration of the entity was used, meaning that a definition is required.
bool isDefinedOutsideFunctionOrMethod() const
isDefinedOutsideFunctionOrMethod - This predicate returns true if this scoped decl is defined outside...
DeclContext * getDeclContext()
AccessSpecifier getAccess() const
const Decl * getNextDeclInContext() const
bool isInAnonymousNamespace() const
SourceLocation getBeginLoc() const LLVM_READONLY
redecl_iterator redecls_begin() const
static void EnableStatistics()
TranslationUnitDecl * getTranslationUnitDecl()
VersionTuple getVersionIntroduced() const
Retrieve the version of the target platform in which this declaration was introduced.
specific_attr_iterator< T > specific_attr_end() const
virtual Decl * getMostRecentDeclImpl()
Implementation of getMostRecentDecl(), to be overridden by any subclass that has a redeclaration chai...
bool hasOwningModule() const
Is this declaration owned by some module?
Decl(const Decl &)=delete
void setCachedLinkage(Linkage L) const
void setModulePrivate()
Specify that this declaration was marked as being private to the module in which it was defined.
bool isFromHeaderUnit() const
Whether this declaration comes from a header unit.
llvm::iterator_range< attr_iterator > attr_range
specific_attr_iterator< T > specific_attr_begin() const
void print(raw_ostream &Out, unsigned Indentation=0, bool PrintInstantiation=false) const
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.
bool hasTagIdentifierNamespace() const
DeclContext * getLexicalDeclContext()
getLexicalDeclContext - The declaration context where this Decl was lexically declared (LexicalDC).
void setNonMemberOperator()
Specifies that this declaration is a C++ overloaded non-member.
void setLexicalDeclContext(DeclContext *DC)
virtual Decl * getCanonicalDecl()
Retrieves the "canonical" declaration of the given declaration.
ModuleOwnershipKind
The kind of ownership a declaration has, for visibility purposes.
@ VisiblePromoted
This declaration has an owning module, and is not visible to the current TU but we promoted it to be ...
@ VisibleWhenImported
This declaration has an owning module, and is visible when that module is imported.
@ Unowned
This declaration is not owned by a module.
@ ReachableWhenImported
This declaration has an owning module, and is visible to lookups that occurs within that module.
@ ModulePrivate
This declaration has an owning module, but is only visible to lookups that occur within that module.
@ Visible
This declaration has an owning module, but is globally visible (typically because its owning module i...
void setModuleOwnershipKind(ModuleOwnershipKind MOK)
Set whether this declaration is hidden from name lookup.
Module * getLocalOwningModule() const
Get the local owning module, if known.
const LangOptions & getLangOpts() const LLVM_READONLY
Helper to get the language options from the ASTContext.
virtual SourceRange getSourceRange() const LLVM_READONLY
Source range that this declaration covers.
GlobalDeclID getGlobalID() const
Retrieve the global declaration ID associated with this declaration, which specifies where this Decl ...
unsigned getOwningModuleID() const
Retrieve the global ID of the module that owns this particular declaration.
static bool classofKind(Kind K)
bool shouldEmitInExternalSource() const
Whether the definition of the declaration should be emitted in external sources.
Decl & operator=(const Decl &)=delete
void setVisibleDespiteOwningModule()
Set that this declaration is globally visible, even if it came from a module that is not visible.
const Decl * getNonClosureContext() const
The name of a declaration.
Represents a function declaration or definition.
FunctionType - C99 6.7.5.3 - Function Declarators.
One of these records is kept for each identifier that is lexed.
StrictFlexArraysLevelKind
Keeps track of the various options that can be enabled, which controls the dialect of C or C++ that i...
Represents a linkage specification.
Describes a module or submodule.
This represents a decl that may have a name.
ObjCContainerDecl - Represents a container for method declarations.
ObjCMethodDecl - Represents an instance or class method declaration.
void print(raw_ostream &OS) const override
PrettyStackTraceDecl(const Decl *theDecl, SourceLocation L, SourceManager &sm, const char *Msg)
A (possibly-)qualified type.
Represents a struct/union/class.
Encodes a location in the source.
This class handles loading and caching of source files into memory.
A trivial tuple used to represent a source range.
SourceLocation getEnd() const
SourceLocation getBegin() const
Stmt - This represents one statement.
The base class of all kinds of template declarations (e.g., class, function, etc.).
Stores a list of template parameters for a TemplateDecl and its derived classes.
The top declaration context.
Represents C++ using-directive.
specific_attr_iterator - Iterates over a subrange of an AttrVec, only providing attributes that are o...
The JSON file list parser is used to communicate input to InstallAPI.
ASTDumpOutputFormat
Used to specify the format for printing AST dump information.
@ ObjCMethodFamilyBitWidth
bool isa(CodeGen::Address addr)
SelectorLocationsKind
Whether all locations of the selector identifiers are in a "standard" position.
bool hasSpecificAttr(const Container &container)
ConstexprSpecKind
Define the kind of constexpr specifier.
LinkageSpecLanguageIDs
Represents the language in a linkage specification.
AccessSpecifier
A C++ access specifier (public, private, protected), plus the special value "none" which means differ...
SmallVector< Attr *, 4 > AttrVec
AttrVec - A vector of Attr, which is how they are stored on the AST.
nullptr
This class represents a compute construct, representing a 'Kind' of ‘parallel’, 'serial',...
OMPDeclareReductionInitKind
StorageClass
Storage classes.
ObjCMethodFamily
A family of Objective-C methods.
Linkage
Describes the different kinds of linkage (C++ [basic.link], C99 6.2.2) that an entity may have.
@ Internal
Internal linkage, which indicates that the entity can be referred to from within the translation unit...
TagTypeKind
The kind of a tag type.
@ FunctionTemplate
The name was classified as a function template name.
AvailabilityResult
Captures the result of checking the availability of a declaration.
ObjCImplementationControl
RecordArgPassingKind
Enum that represents the different ways arguments are passed to and returned from function calls.
auto * getSpecificAttr(const Container &container)
DeductionCandidate
Only used by CXXDeductionGuideDecl.
bool declaresSameEntity(const Decl *D1, const Decl *D2)
Determine whether two declarations declare the same entity.
U cast(CodeGen::Address addr)
Diagnostic wrappers for TextAPI types for error reporting.
__packed_splat4 __packed_splat2 __packed_splat8 __packed_splat4 __packed_splat2 __packed_splat4 __packed_splat2 __packed_splat8 __packed_splat4 uint32_t
UsingDirectiveDecl * operator*() const
udir_iterator(lookup_iterator I)
A placeholder type used to construct an empty shell of a decl-derived type that will be filled in lat...
Describes how types, statements, expressions, and declarations should be printed.
static ToTy * doit(DeclContext *Val)
static const ToTy * doit(const DeclContext *Val)
static const ToTy * doit(const DeclContext *Val)
static ToTy * doit(DeclContext *Val)
static void * getAsVoidPointer(::clang::NamedDecl *P)
static inline ::clang::NamedDecl * getFromVoidPointer(void *P)
static constexpr int NumLowBitsAvailable
static ToTy & doit(::clang::DeclContext &Val)
static ToTy * doit(::clang::DeclContext *Val)
static const ToTy & doit(const ::clang::DeclContext &Val)
static const ToTy * doit(const ::clang::DeclContext *Val)
::clang::DeclContext & doit(const FromTy &Val)
::clang::DeclContext * doit(const FromTy *Val)
static const ::clang::DeclContext & doit(const FromTy &Val)
static const ::clang::DeclContext * doit(const FromTy *Val)
static bool doit(const ::clang::DeclContext &Val)