13#ifndef LLVM_CLANG_AST_DECLBASE_H
14#define LLVM_CLANG_AST_DECLBASE_H
25#include "llvm/ADT/ArrayRef.h"
26#include "llvm/ADT/PointerIntPair.h"
27#include "llvm/ADT/PointerUnion.h"
28#include "llvm/ADT/iterator.h"
29#include "llvm/ADT/iterator_range.h"
30#include "llvm/Support/Casting.h"
31#include "llvm/Support/Compiler.h"
32#include "llvm/Support/PrettyStackTrace.h"
33#include "llvm/Support/VersionTuple.h"
45class ASTMutationListener;
49class ExternalSourceSymbolAttr;
53enum class Linkage :
unsigned char;
57class ObjCContainerDecl;
65class TemplateParameterList;
66class TranslationUnitDecl;
67class UsingDirectiveDecl;
89#define DECL(DERIVED, BASE) DERIVED,
90#define ABSTRACT_DECL(DECL)
91#define DECL_RANGE(BASE, START, END) \
92 first##BASE = START, last##BASE = END,
93#define LAST_DECL_RANGE(BASE, START, END) \
94 first##BASE = START, last##BASE = END
95#include "clang/AST/DeclNodes.inc"
271 llvm::PointerUnion<DeclContext*, MultipleDC*> DeclCtx;
273 bool isInSemaDC()
const {
return DeclCtx.is<
DeclContext*>(); }
274 bool isOutOfSemaDC()
const {
return DeclCtx.is<MultipleDC*>(); }
276 MultipleDC *getMultipleDC()
const {
277 return DeclCtx.get<MultipleDC*>();
288 LLVM_PREFERRED_TYPE(
Kind)
289 unsigned DeclKind : 7;
292 LLVM_PREFERRED_TYPE(
bool)
293 unsigned InvalidDecl : 1;
296 LLVM_PREFERRED_TYPE(
bool)
297 unsigned HasAttrs : 1;
301 LLVM_PREFERRED_TYPE(
bool)
302 unsigned Implicit : 1;
306 LLVM_PREFERRED_TYPE(
bool)
313 LLVM_PREFERRED_TYPE(
bool)
314 unsigned Referenced : 1;
319 LLVM_PREFERRED_TYPE(
bool)
320 unsigned TopLevelDeclInObjCContainer : 1;
323 static bool StatisticsEnabled;
341 LLVM_PREFERRED_TYPE(
bool)
361 void *operator new(
std::
size_t Size, const
ASTContext &Ctx,
unsigned ID,
362 std::
size_t Extra = 0);
369 bool AccessDeclContextCheck() const;
375 auto *D = cast<Decl>(DC);
376 auto MOK = D->getModuleOwnershipKind();
378 (!D->isFromASTFile() || D->hasLocalOwningModuleStorage()))
396 DeclCtx(DC), Loc(L), DeclKind(DK), InvalidDecl(
false), HasAttrs(
false),
401 if (StatisticsEnabled)
add(DK);
410 if (StatisticsEnabled)
add(DK);
455 return getSemanticDC();
456 return getMultipleDC()->SemanticDC;
499 bool IgnoreTemplateOrMacroSubstitution);
509 assert(AccessDeclContextCheck());
513 assert(AccessDeclContextCheck());
552 if (!HasAttrs)
return;
555 llvm::erase_if(Vec, [](
Attr *A) {
return isa<Ts...>(A); });
561 template <
typename T>
void dropAttr() { dropAttrs<T>(); }
563 template <
typename T>
565 return llvm::make_range(specific_attr_begin<T>(), specific_attr_end<T>());
568 template <
typename T>
573 template <
typename T>
607 bool isUsed(
bool CheckUsedAttr =
true)
const;
634 return TopLevelDeclInObjCContainer;
638 TopLevelDeclInObjCContainer =
V;
715 assert(
isFromASTFile() &&
"Only works on a deserialized declaration");
716 *((
unsigned*)
this - 2) =
ID;
739 VersionTuple EnclosingVersion = VersionTuple(),
740 StringRef *RealizedPlatform =
nullptr)
const;
792 return *((
const unsigned*)
this - 1);
800 return *((
const unsigned*)
this - 2);
805 Module *getOwningModuleSlow()
const;
817 return getOwningModuleSlow();
827 "owned local decl but no local module storage");
828 return reinterpret_cast<Module *
const *
>(
this)[-1];
833 "should not have a cached owning module");
834 reinterpret_cast<Module **
>(
this)[-1] = M;
885 "no storage available for owning module for this declaration");
920 return getSemanticDC();
921 return getMultipleDC()->LexicalDC;
1005 Decl *Current =
nullptr;
1022 assert(Current &&
"Advancing while iterator has reached end");
1024 Decl *Next = Current->getNextRedeclarationImpl();
1025 assert(Next &&
"Should return next redeclaration or itself, never null!");
1026 Current = (Next != Starter) ? Next :
nullptr;
1037 return x.Current == y.Current;
1041 return x.Current != y.Current;
1120 return (DeclKind >= Decl::firstFunction &&
1121 DeclKind <= Decl::lastFunction) ||
1122 DeclKind == FunctionTemplate;
1159 "namespace is not ordinary");
1185 "namespace includes neither ordinary nor tag");
1189 "namespace includes other than ordinary or tag");
1196 if (PerformFriendInjection ||
1204 if (PerformFriendInjection ||
1238 "visible non-member operators should be in ordinary namespace");
1246 void print(raw_ostream &Out,
unsigned Indentation = 0,
1247 bool PrintInstantiation =
false)
const;
1249 unsigned Indentation = 0,
bool PrintInstantiation =
false)
const;
1252 unsigned Indentation = 0);
1260 void dump(raw_ostream &Out,
bool Deserialize =
false,
1264 int64_t
getID()
const;
1298 const Decl *TheDecl;
1301 const char *Message;
1306 : TheDecl(theDecl), Loc(L),
SM(sm), Message(Msg) {}
1308 void print(raw_ostream &OS)
const override;
1320 static constexpr int NumLowBitsAvailable = 3;
1330 using Decls = llvm::PointerUnion<NamedDecl*, DeclListNode*>;
1347 assert(Ptr &&
"dereferencing end() iterator");
1356 assert(!Ptr.isNull() &&
"Advancing empty iterator");
1359 Ptr = CurNode->Rest;
1374 Decls Rest =
nullptr;
1400 bool empty()
const {
return Result.isNull(); }
1409 for (
auto *D : *
this)
1410 if (T *
Decl = dyn_cast<T>(D))
1466 class DeclContextBitfields {
1470 uint64_t DeclKind : 7;
1475 LLVM_PREFERRED_TYPE(
bool)
1476 mutable uint64_t ExternalLexicalStorage : 1;
1481 LLVM_PREFERRED_TYPE(
bool)
1482 mutable uint64_t ExternalVisibleStorage : 1;
1488 LLVM_PREFERRED_TYPE(
bool)
1489 mutable uint64_t NeedToReconcileExternalVisibleStorage : 1;
1493 LLVM_PREFERRED_TYPE(
bool)
1494 mutable uint64_t HasLazyLocalLexicalLookups : 1;
1498 LLVM_PREFERRED_TYPE(
bool)
1499 mutable uint64_t HasLazyExternalLexicalLookups : 1;
1504 LLVM_PREFERRED_TYPE(
bool)
1505 mutable uint64_t UseQualifiedLookup : 1;
1509 enum { NumDeclContextBits = 13 };
1514 class TagDeclBitfields {
1515 friend class TagDecl;
1517 LLVM_PREFERRED_TYPE(DeclContextBitfields)
1518 uint64_t : NumDeclContextBits;
1522 uint64_t TagDeclKind : 3;
1527 LLVM_PREFERRED_TYPE(
bool)
1528 uint64_t IsCompleteDefinition : 1;
1531 LLVM_PREFERRED_TYPE(
bool)
1532 uint64_t IsBeingDefined : 1;
1536 LLVM_PREFERRED_TYPE(
bool)
1537 uint64_t IsEmbeddedInDeclarator : 1;
1540 LLVM_PREFERRED_TYPE(
bool)
1541 uint64_t IsFreeStanding : 1;
1547 LLVM_PREFERRED_TYPE(
bool)
1548 uint64_t MayHaveOutOfDateDef : 1;
1552 LLVM_PREFERRED_TYPE(
bool)
1553 uint64_t IsCompleteDefinitionRequired : 1;
1557 LLVM_PREFERRED_TYPE(
bool)
1558 uint64_t IsThisDeclarationADemotedDefinition : 1;
1562 enum { NumTagDeclBits = NumDeclContextBits + 10 };
1567 class EnumDeclBitfields {
1568 friend class EnumDecl;
1570 LLVM_PREFERRED_TYPE(TagDeclBitfields)
1583 LLVM_PREFERRED_TYPE(
bool)
1590 LLVM_PREFERRED_TYPE(
bool)
1591 uint64_t IsScopedUsingClassTag : 1;
1595 LLVM_PREFERRED_TYPE(
bool)
1599 LLVM_PREFERRED_TYPE(
bool)
1604 enum { NumEnumDeclBits = NumTagDeclBits + 20 };
1609 class RecordDeclBitfields {
1610 friend class RecordDecl;
1612 LLVM_PREFERRED_TYPE(TagDeclBitfields)
1618 LLVM_PREFERRED_TYPE(
bool)
1619 uint64_t HasFlexibleArrayMember : 1;
1622 LLVM_PREFERRED_TYPE(
bool)
1623 uint64_t AnonymousStructOrUnion : 1;
1627 LLVM_PREFERRED_TYPE(
bool)
1632 LLVM_PREFERRED_TYPE(
bool)
1639 LLVM_PREFERRED_TYPE(
bool)
1640 mutable uint64_t LoadedFieldsFromExternalStorage : 1;
1643 LLVM_PREFERRED_TYPE(
bool)
1644 uint64_t NonTrivialToPrimitiveDefaultInitialize : 1;
1645 LLVM_PREFERRED_TYPE(
bool)
1646 uint64_t NonTrivialToPrimitiveCopy : 1;
1647 LLVM_PREFERRED_TYPE(
bool)
1648 uint64_t NonTrivialToPrimitiveDestroy : 1;
1653 LLVM_PREFERRED_TYPE(
bool)
1654 uint64_t HasNonTrivialToPrimitiveDefaultInitializeCUnion : 1;
1655 LLVM_PREFERRED_TYPE(
bool)
1656 uint64_t HasNonTrivialToPrimitiveDestructCUnion : 1;
1657 LLVM_PREFERRED_TYPE(
bool)
1658 uint64_t HasNonTrivialToPrimitiveCopyCUnion : 1;
1661 LLVM_PREFERRED_TYPE(
bool)
1662 uint64_t ParamDestroyedInCallee : 1;
1666 uint64_t ArgPassingRestrictions : 2;
1669 LLVM_PREFERRED_TYPE(
bool)
1678 enum { NumRecordDeclBits = NumTagDeclBits + 41 };
1683 class OMPDeclareReductionDeclBitfields {
1684 friend class OMPDeclareReductionDecl;
1686 LLVM_PREFERRED_TYPE(DeclContextBitfields)
1697 enum { NumOMPDeclareReductionDeclBits = NumDeclContextBits + 2 };
1703 class FunctionDeclBitfields {
1704 friend class FunctionDecl;
1706 friend class CXXDeductionGuideDecl;
1708 LLVM_PREFERRED_TYPE(DeclContextBitfields)
1713 LLVM_PREFERRED_TYPE(
bool)
1715 LLVM_PREFERRED_TYPE(
bool)
1718 LLVM_PREFERRED_TYPE(
bool)
1720 LLVM_PREFERRED_TYPE(
bool)
1722 LLVM_PREFERRED_TYPE(
bool)
1723 uint64_t HasInheritedPrototype : 1;
1724 LLVM_PREFERRED_TYPE(
bool)
1726 LLVM_PREFERRED_TYPE(
bool)
1729 LLVM_PREFERRED_TYPE(
bool)
1735 LLVM_PREFERRED_TYPE(
bool)
1738 LLVM_PREFERRED_TYPE(
bool)
1740 LLVM_PREFERRED_TYPE(
bool)
1741 uint64_t IsExplicitlyDefaulted : 1;
1742 LLVM_PREFERRED_TYPE(
bool)
1743 uint64_t HasDefaultedFunctionInfo : 1;
1748 LLVM_PREFERRED_TYPE(
bool)
1749 uint64_t IsIneligibleOrNotSelected : 1;
1751 LLVM_PREFERRED_TYPE(
bool)
1752 uint64_t HasImplicitReturnZero : 1;
1753 LLVM_PREFERRED_TYPE(
bool)
1759 LLVM_PREFERRED_TYPE(
bool)
1760 uint64_t BodyContainsImmediateEscalatingExpression : 1;
1762 LLVM_PREFERRED_TYPE(
bool)
1763 uint64_t InstantiationIsPending : 1;
1766 LLVM_PREFERRED_TYPE(
bool)
1771 LLVM_PREFERRED_TYPE(
bool)
1776 LLVM_PREFERRED_TYPE(
bool)
1781 LLVM_PREFERRED_TYPE(
bool)
1788 uint64_t DeductionCandidateKind : 2;
1791 LLVM_PREFERRED_TYPE(
bool)
1795 LLVM_PREFERRED_TYPE(
bool)
1800 LLVM_PREFERRED_TYPE(
bool)
1801 uint64_t FriendConstraintRefersToEnclosingTemplate : 1;
1805 enum { NumFunctionDeclBits = NumDeclContextBits + 31 };
1810 class CXXConstructorDeclBitfields {
1811 friend class CXXConstructorDecl;
1813 LLVM_PREFERRED_TYPE(FunctionDeclBitfields)
1822 LLVM_PREFERRED_TYPE(
bool)
1823 uint64_t IsInheritingConstructor : 1;
1826 LLVM_PREFERRED_TYPE(
bool)
1827 uint64_t HasTrailingExplicitSpecifier : 1;
1830 LLVM_PREFERRED_TYPE(
bool)
1835 enum { NumCXXConstructorDeclBits = NumFunctionDeclBits + 20 };
1840 class ObjCMethodDeclBitfields {
1841 friend class ObjCMethodDecl;
1844 LLVM_PREFERRED_TYPE(DeclContextBitfields)
1854 LLVM_PREFERRED_TYPE(
bool)
1856 LLVM_PREFERRED_TYPE(
bool)
1860 LLVM_PREFERRED_TYPE(
bool)
1864 LLVM_PREFERRED_TYPE(
bool)
1865 uint64_t IsSynthesizedAccessorStub : 1;
1868 LLVM_PREFERRED_TYPE(
bool)
1872 LLVM_PREFERRED_TYPE(
bool)
1876 LLVM_PREFERRED_TYPE(
bool)
1877 mutable uint64_t HasRedeclaration : 1;
1888 LLVM_PREFERRED_TYPE(
bool)
1903 LLVM_PREFERRED_TYPE(
bool)
1907 LLVM_PREFERRED_TYPE(
bool)
1912 enum { NumObjCMethodDeclBits = NumDeclContextBits + 24 };
1917 class ObjCContainerDeclBitfields {
1918 friend class ObjCContainerDecl;
1920 LLVM_PREFERRED_TYPE(DeclContextBitfields)
1921 uint32_t : NumDeclContextBits;
1925 SourceLocation AtStart;
1931 enum { NumObjCContainerDeclBits = 64 };
1936 class LinkageSpecDeclBitfields {
1937 friend class LinkageSpecDecl;
1939 LLVM_PREFERRED_TYPE(DeclContextBitfields)
1950 LLVM_PREFERRED_TYPE(
bool)
1955 enum { NumLinkageSpecDeclBits = NumDeclContextBits + 4 };
1960 class BlockDeclBitfields {
1961 friend class BlockDecl;
1963 LLVM_PREFERRED_TYPE(DeclContextBitfields)
1966 LLVM_PREFERRED_TYPE(
bool)
1968 LLVM_PREFERRED_TYPE(
bool)
1970 LLVM_PREFERRED_TYPE(
bool)
1971 uint64_t BlockMissingReturnType : 1;
1972 LLVM_PREFERRED_TYPE(
bool)
1973 uint64_t IsConversionFromLambda : 1;
1977 LLVM_PREFERRED_TYPE(
bool)
1983 LLVM_PREFERRED_TYPE(
bool)
1988 enum { NumBlockDeclBits = NumDeclContextBits + 5 };
1996 mutable StoredDeclsMap *LookupPtr =
nullptr;
2020 static_assert(
sizeof(DeclContextBitfields) <= 8,
2021 "DeclContextBitfields is larger than 8 bytes!");
2022 static_assert(
sizeof(TagDeclBitfields) <= 8,
2023 "TagDeclBitfields is larger than 8 bytes!");
2024 static_assert(
sizeof(EnumDeclBitfields) <= 8,
2025 "EnumDeclBitfields is larger than 8 bytes!");
2026 static_assert(
sizeof(RecordDeclBitfields) <= 8,
2027 "RecordDeclBitfields is larger than 8 bytes!");
2028 static_assert(
sizeof(OMPDeclareReductionDeclBitfields) <= 8,
2029 "OMPDeclareReductionDeclBitfields is larger than 8 bytes!");
2030 static_assert(
sizeof(FunctionDeclBitfields) <= 8,
2031 "FunctionDeclBitfields is larger than 8 bytes!");
2032 static_assert(
sizeof(CXXConstructorDeclBitfields) <= 8,
2033 "CXXConstructorDeclBitfields is larger than 8 bytes!");
2034 static_assert(
sizeof(ObjCMethodDeclBitfields) <= 8,
2035 "ObjCMethodDeclBitfields is larger than 8 bytes!");
2036 static_assert(
sizeof(ObjCContainerDeclBitfields) <= 8,
2037 "ObjCContainerDeclBitfields is larger than 8 bytes!");
2038 static_assert(
sizeof(LinkageSpecDeclBitfields) <= 8,
2039 "LinkageSpecDeclBitfields is larger than 8 bytes!");
2040 static_assert(
sizeof(BlockDeclBitfields) <= 8,
2041 "BlockDeclBitfields is larger than 8 bytes!");
2057 static std::pair<Decl *, Decl *>
2077 return cast<Decl>(
this)->getDeclContext();
2093 return cast<Decl>(
this)->getLexicalDeclContext();
2106 return cast<Decl>(
this)->getASTContext();
2117 case Decl::ObjCCategory:
2118 case Decl::ObjCCategoryImpl:
2119 case Decl::ObjCImplementation:
2120 case Decl::ObjCInterface:
2121 case Decl::ObjCProtocol:
2131 case Decl::Captured:
2132 case Decl::ObjCMethod:
2133 case Decl::TopLevelStmt:
2291 Decl *Current =
nullptr;
2309 Current = Current->getNextDeclInContext();
2320 return x.Current == y.Current;
2324 return x.Current != y.Current;
2351 template<
typename SpecificDecl>
2361 void SkipToNextDecl() {
2362 while (*Current && !isa<SpecificDecl>(*Current))
2373 std::iterator_traits<DeclContext::decl_iterator>::difference_type;
2409 return x.Current == y.Current;
2414 return x.Current != y.Current;
2427 template<
typename SpecificDecl,
bool (SpecificDecl::*Acceptable)() const>
2437 void SkipToNextDecl() {
2439 (!isa<SpecificDecl>(*Current) ||
2440 (Acceptable && !(cast<SpecificDecl>(*Current)->*Acceptable)())))
2451 std::iterator_traits<DeclContext::decl_iterator>::difference_type;
2485 return x.Current == y.Current;
2490 return x.Current != y.Current;
2620 using ddiag_range = llvm::iterator_range<DeclContext::ddiag_iterator>;
2634 "should only be called on primary context");
2667 if (ES && LookupPtr)
2694 bool Deserialize =
false)
const;
2701 bool hasNeedToReconcileExternalVisibleStorage()
const {
2709 void setNeedToReconcileExternalVisibleStorage(
bool Need =
true)
const {
2715 bool hasLazyLocalLexicalLookups()
const {
2721 void setHasLazyLocalLexicalLookups(
bool HasLLLL =
true)
const {
2727 bool hasLazyExternalLexicalLookups()
const {
2733 void setHasLazyExternalLexicalLookups(
bool HasLELL =
true)
const {
2737 void reconcileExternalVisibleStorage()
const;
2738 bool LoadLexicalDeclsFromExternalStorage()
const;
2740 StoredDeclsMap *CreateStoredDeclsMap(ASTContext &
C)
const;
2742 void loadLazyLocalLexicalLookups();
2743 void buildLookupImpl(DeclContext *DCtx,
bool Internal);
2744 void makeDeclVisibleInContextWithFlags(NamedDecl *D,
bool Internal,
2745 bool Rediscoverable);
2746 void makeDeclVisibleInContextImpl(NamedDecl *D,
bool Internal);
2750 return getKind() == TemplateTypeParm ||
getKind() == NonTypeTemplateParm ||
2751 getKind() == TemplateTemplateParm;
2755template <
class ToTy,
2756 bool IsKnownSubtype = ::std::is_base_of<DeclContext, ToTy>::value>
2768template <
class ToTy>
2771 return static_cast<const ToTy*
>(Val);
2775 return static_cast<ToTy*
>(Val);
2784template <
typename To>
2786 static bool doit(const ::clang::DeclContext &Val) {
2787 return To::classofKind(Val.getDeclKind());
2793struct cast_convert_val<ToTy,
2795 static const ToTy &
doit(const ::clang::DeclContext &Val) {
2808struct cast_convert_val<ToTy,
2810 static const ToTy *
doit(const ::clang::DeclContext *Val) {
2811 return ::clang::cast_convert_decl_context<ToTy>::doit(Val);
2818 return ::clang::cast_convert_decl_context<ToTy>::doit(Val);
2823template<
class FromTy>
2825 static ::clang::DeclContext &
doit(
const FromTy &Val) {
2826 return *FromTy::castToDeclContext(&Val);
2830template<
class FromTy>
2832 static ::clang::DeclContext *
doit(
const FromTy *Val) {
2833 return FromTy::castToDeclContext(Val);
2837template<
class FromTy>
2839 static const ::clang::DeclContext &
doit(
const FromTy &Val) {
2840 return *FromTy::castToDeclContext(&Val);
2844template<
class FromTy>
2846 static const ::clang::DeclContext *
doit(
const FromTy *Val) {
2847 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
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...
Reads an AST files chain containing the contents of a translation unit.
Writes an AST file containing the contents of a translation unit.
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)
DeclContextLookupResult()=default
const_iterator begin() const
DeclListNode::iterator iterator
const_iterator end() const
bool isSingleResult() const
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
friend bool operator!=(decl_iterator x, decl_iterator y)
friend bool operator==(decl_iterator x, decl_iterator y)
reference operator*() const
decl_iterator & operator++()
Iterates over a filtered subrange of declarations stored in a DeclContext.
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
filtered_decl_iterator operator++(int)
friend bool operator!=(const filtered_decl_iterator &x, const filtered_decl_iterator &y)
std::iterator_traits< DeclContext::decl_iterator >::difference_type difference_type
SpecificDecl * value_type
filtered_decl_iterator()=default
filtered_decl_iterator & operator++()
specific_decl_iterator - Iterates over a subrange of declarations stored in a DeclContext,...
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::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++()
std::iterator_traits< DeclContext::decl_iterator >::difference_type difference_type
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
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...
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,...
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.
decl_iterator noload_decls_begin() const
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.
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
llvm::iterator_adaptor_base< udir_iterator, lookup_iterator, typename lookup_iterator::iterator_category, UsingDirectiveDecl * > udir_iterator_base
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.
Decl * LastDecl
LastDecl - The last declaration stored within this declaration context.
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...
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
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.
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 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()
decl_iterator decls_begin() const
const DeclContext * getLexicalParent() const
std::forward_iterator_tag iterator_category
ptrdiff_t difference_type
reference operator*() const
bool operator==(const iterator &X) const
bool operator!=(const iterator &X) const
A list storing NamedDecls in the lookup tables.
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)
std::ptrdiff_t difference_type
redecl_iterator()=default
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.
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.
unsigned getOwningModuleID() const
Retrieve the global ID of the module that owns this particular declaration.
bool isTemplateDecl() const
returns true if this declaration is a template
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.
ASTContext & getASTContext() const LLVM_READONLY
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,...
bool isFunctionPointerType() const
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.
Module * getOwningModuleForLinkage(bool IgnoreLinkage=false) const
Get the module that owns this declaration for linkage purposes.
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...
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.
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.
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 *)
void setOwningModuleID(unsigned ID)
Set the owning module ID.
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 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
bool shouldSkipCheckingODR() const
Check if we should skip checking ODRHash for declaration.
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)
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.
bool isTopLevelDeclInObjCContainer() const
Whether this declaration is a top-level declaration (function, global variable, etc....
void setLocation(SourceLocation L)
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.
llvm::iterator_range< attr_iterator > attr_range
specific_attr_iterator< T > specific_attr_begin() const
void updateOutOfDate(IdentifierInfo &II) const
Update a potentially out-of-date declaration.
void print(raw_ostream &Out, unsigned Indentation=0, bool PrintInstantiation=false) const
static bool isFlexibleArrayMemberLike(ASTContext &Context, const Decl *D, QualType Ty, LangOptions::StrictFlexArraysLevelKind StrictFlexArraysLevel, bool IgnoreTemplateOrMacroSubstitution)
Whether it resembles a flexible array member.
void setDeclContext(DeclContext *DC)
setDeclContext - Set both the semantic and lexical DeclContext to DC.
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)
unsigned getGlobalID() const
Retrieve the global declaration ID associated with this declaration, which specifies where this Decl ...
virtual Decl * getCanonicalDecl()
Retrieves the "canonical" declaration of the given declaration.
ModuleOwnershipKind
The kind of ownership a declaration has, for visibility purposes.
@ 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.
static bool classofKind(Kind K)
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.
bool isDiscardedInGlobalModuleFragment() const
FIXME: Implement discarding declarations actually in global module fragment.
const Decl * getNonClosureContext() const
The name of a declaration.
A dependently-generated diagnostic.
Abstract interface for external sources of AST nodes.
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.
PrettyStackTraceDecl - If a crash occurs, indicate that it happened when doing something to a specifi...
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.
Provides common interface for the Decls that can be redeclared.
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.
An array of decls optimized for the common case of only containing one entry.
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.
bool isa(CodeGen::Address addr)
SelectorLocationsKind
Whether all locations of the selector identifiers are in a "standard" position.
ConstexprSpecKind
Define the kind of constexpr specifier.
LinkageSpecLanguageIDs
Represents the language in a linkage specification.
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...
@ Module
Module linkage, which indicates that the entity can be referred to from other translation units withi...
Language
The language for the input, used to select and validate the language standard and possible actions.
TagTypeKind
The kind of a tag type.
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.
@ ObjCMethodFamilyBitWidth
DeductionCandidate
Only used by CXXDeductionGuideDecl.
bool declaresSameEntity(const Decl *D1, const Decl *D2)
Determine whether two declarations declare the same entity.
AccessSpecifier
A C++ access specifier (public, private, protected), plus the special value "none" which means differ...
YAML serialization mapping.
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 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)