14#ifndef LLVM_CLANG_AST_ASTUNRESOLVEDSET_H
15#define LLVM_CLANG_AST_ASTUNRESOLVEDSET_H
32 struct DeclsTy :
ASTVector<DeclAccessPair> {
36 bool isLazy()
const {
return getTag(); }
37 void setLazy(
bool Lazy) {
setTag(Lazy); }
64 if (I->getDecl() == Old) {
73 if (I == Decls.size() - 1)
76 Decls[I] = Decls.pop_back_val();
81 bool empty()
const {
return Decls.empty(); }
82 unsigned size()
const {
return Decls.size(); }
89 Decls.append(
C, I.I, E.I);
105 if (Impl.Decls.isLazy())
106 getFromExternalSource(
C);
113 assert(Impl.
empty() || Impl.Decls.isLazy());
114 Impl.Decls.setLazy(
true);
Defines various enumerations that describe declaration and type specifiers.
Holds long-lived AST nodes (such as types and decls) that can be referred to throughout the semantic ...
An UnresolvedSet-like class which uses the ASTContext's allocator.
void append(ASTContext &C, iterator I, iterator E)
const DeclAccessPair & operator[](unsigned I) const
bool replace(const NamedDecl *Old, NamedDecl *New, AccessSpecifier AS)
Replaces the given declaration with the new one, once.
UnresolvedSetIterator iterator
UnresolvedSetIterator const_iterator
const_iterator end() const
ASTUnresolvedSet(ASTContext &C, unsigned N)
void reserve(ASTContext &C, unsigned N)
const_iterator begin() const
void addDecl(ASTContext &C, NamedDecl *D, AccessSpecifier AS)
ASTUnresolvedSet()=default
DeclAccessPair & operator[](unsigned I)
A POD class for pairing a NamedDecl* with an access specifier.
static DeclAccessPair make(NamedDecl *D, AccessSpecifier AS)
An UnresolvedSet-like class that might not have been loaded from the external AST source yet.
void reserve(ASTContext &C, unsigned N)
void addLazyDecl(ASTContext &C, uintptr_t ID, AccessSpecifier AS)
ASTUnresolvedSet & get(ASTContext &C) const
This represents a decl that may have a name.
The iterator over UnresolvedSets.
AccessSpecifier
A C++ access specifier (public, private, protected), plus the special value "none" which means differ...
__UINTPTR_TYPE__ uintptr_t
An unsigned integer type with the property that any valid pointer to void can be converted to this ty...