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);
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)
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 ...
void addDecl(ASTContext &C, NamedDecl *D, AccessSpecifier AS)
static DeclAccessPair make(NamedDecl *D, AccessSpecifier AS)
ID
Defines the set of possible language-specific address spaces.
void reserve(ASTContext &C, unsigned N)
const DeclAccessPair & operator[](unsigned I) const
ASTUnresolvedSet(ASTContext &C, unsigned N)
void reserve(ASTContext &C, unsigned N)
An UnresolvedSet-like class which uses the ASTContext's allocator.
const_iterator begin() const
DeclAccessPair & operator[](unsigned I)
const_iterator end() const
UnresolvedSetIterator const_iterator