15 #ifndef LLVM_CLANG_AST_ASTUNRESOLVEDSET_H
16 #define LLVM_CLANG_AST_ASTUNRESOLVEDSET_H
25 struct DeclsTy :
ASTVector<DeclAccessPair> {
29 bool isLazy()
const {
return getTag(); }
30 void setLazy(
bool Lazy) { setTag(Lazy); }
59 if (
I->getDecl() == Old) {
67 void erase(
unsigned I) { Decls[
I] = Decls.pop_back_val(); }
71 bool empty()
const {
return Decls.empty(); }
72 unsigned size()
const {
return Decls.size(); }
79 Decls.append(C, I.I, E.I);
91 void getFromExternalSource(
ASTContext &C)
const;
95 if (Impl.Decls.isLazy())
96 getFromExternalSource(C);
102 assert(Impl.
empty() || Impl.Decls.isLazy());
103 Impl.Decls.setLazy(
true);
104 Impl.
addDecl(C, reinterpret_cast<NamedDecl*>(ID << 2), AS);
UnresolvedSetIterator iterator
bool replace(const NamedDecl *Old, NamedDecl *New, AccessSpecifier AS)
Replaces the given declaration with the new one, once.
void append(ASTContext &C, iterator I, iterator E)
AccessSpecifier
A C++ access specifier (public, private, protected), plus the special value "none" which means differ...
An UnresolvedSet-like class that might not have been loaded from the external AST source yet...
void addLazyDecl(ASTContext &C, uintptr_t ID, AccessSpecifier AS)
Holds long-lived AST nodes (such as types and decls) that can be referred to throughout the semantic ...
The iterator over UnresolvedSets.
void addDecl(ASTContext &C, NamedDecl *D, AccessSpecifier AS)
static DeclAccessPair make(NamedDecl *D, AccessSpecifier AS)
detail::InMemoryDirectory::const_iterator I
void reserve(ASTContext &C, unsigned N)
__UINTPTR_TYPE__ uintptr_t
An unsigned integer type with the property that any valid pointer to void can be converted to this ty...
const DeclAccessPair & operator[](unsigned I) const
ASTUnresolvedSet(ASTContext &C, unsigned N)
A POD class for pairing a NamedDecl* with an access specifier.
void reserve(ASTContext &C, unsigned N)
detail::InMemoryDirectory::const_iterator E
An UnresolvedSet-like class which uses the ASTContext's allocator.
const_iterator begin() const
DeclAccessPair & operator[](unsigned I)
const_iterator end() const
NamedDecl - This represents a decl with a name.
UnresolvedSetIterator const_iterator