15 #ifndef LLVM_CLANG_AST_UNRESOLVEDSET_H
16 #define LLVM_CLANG_AST_UNRESOLVEDSET_H
20 #include "llvm/ADT/ArrayRef.h"
21 #include "llvm/ADT/SmallVector.h"
22 #include "llvm/ADT/iterator.h"
29 UnresolvedSetIterator, DeclAccessPair *,
30 std::random_access_iterator_tag, NamedDecl *,
31 std::ptrdiff_t, NamedDecl *, NamedDecl *> {
37 : iterator_adaptor_base(Iter) {}
89 for (DeclsTy::iterator I = decls().
begin(), E = decls().
end(); I != E; ++I)
90 if (I->getDecl() == Old)
91 return (I->setDecl(New),
true);
103 void erase(
unsigned I) { decls()[I] = decls().pop_back_val(); }
112 bool empty()
const {
return decls().empty(); }
113 unsigned size()
const {
return decls().size(); }
124 return *
reinterpret_cast<DeclsTy*
>(
this);
126 const DeclsTy &decls()
const {
127 return *
reinterpret_cast<const DeclsTy*
>(
this);
void replace(iterator I, NamedDecl *New)
void setDecl(NamedDecl *ND) const
void setAccess(iterator I, AccessSpecifier AS)
AccessSpecifier
A C++ access specifier (public, private, protected), plus the special value "none" which means differ...
void setAccess(AccessSpecifier AS)
UnresolvedSetIterator const_iterator
const_iterator begin() const
const DeclAccessPair & operator[](unsigned I) const
void addDecl(NamedDecl *D, AccessSpecifier AS)
NamedDecl * operator->() const
void replace(iterator I, NamedDecl *New, AccessSpecifier AS)
static DeclAccessPair make(NamedDecl *D, AccessSpecifier AS)
void set_size(unsigned N)
Forward-declares and imports various common LLVM datatypes that clang wants to use unqualified...
A set of unresolved declarations.
void append(iterator I, iterator E)
NamedDecl * getDecl() const
bool replace(const NamedDecl *Old, NamedDecl *New)
A reference to an overloaded function set, either an UnresolvedLookupExpr or an UnresolvedMemberExpr...
const_iterator end() const
void addDecl(NamedDecl *D)
const DeclAccessPair & getPair() const
AccessSpecifier getAccess() const
A set of unresolved declarations.
An UnresolvedSet-like class which uses the ASTContext's allocator.
NamedDecl * operator*() const
void setAccess(AccessSpecifier AS)
DeclAccessPair & operator[](unsigned I)
UnresolvedSetIterator iterator